diff options
Diffstat (limited to 'comms/obexftp/patches/patch-ai')
-rw-r--r-- | comms/obexftp/patches/patch-ai | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/comms/obexftp/patches/patch-ai b/comms/obexftp/patches/patch-ai deleted file mode 100644 index bd4659c6ee9..00000000000 --- a/comms/obexftp/patches/patch-ai +++ /dev/null @@ -1,119 +0,0 @@ -$NetBSD: patch-ai,v 1.4 2012/02/16 17:40:29 hans Exp $ - ---- apps/obexftpd.c.orig 2006-04-13 07:57:55.000000000 +0200 -+++ apps/obexftpd.c -@@ -23,6 +23,10 @@ - * Created at: Don, 2 Okt 2003 - */ - -+#ifdef HAVE_CONFIG_H -+#include <config.h> -+#endif -+ - #include <stdio.h> - #include <stdlib.h> - #include <string.h> -@@ -45,6 +49,14 @@ - #include <netdb.h> - #endif /*_WIN32*/ - -+#ifdef HAVE_BLUETOOTH -+#if defined(__NetBSD__) || defined(__DragonFly__) -+#include <bluetooth.h> -+#else -+#include <bluetooth/bluetooth.h> -+#endif -+#endif /* HAVE_BLUETOOTH */ -+ - /* just until there is a server layer in obexftp */ - #include <openobex/obex.h> - -@@ -56,6 +68,8 @@ - - #include "obexftp_sdp.h" - -+#define DEFFILEMOD (S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) /* 0644 */ -+ - /* define this to "", "\r\n" or "\n" */ - #define EOLCHARS "\n" - -@@ -72,7 +86,9 @@ - - //BEGIN of constant - -+#ifdef HAVE_BLUETOOTH - bdaddr_t *bt_src = NULL; -+#endif - char *device = NULL; - int channel = 10; /* OBEX_PUSH_HANDLE */ - -@@ -698,7 +714,7 @@ static int safe_save_file(char *name, co - #ifdef _WIN32 - fd = open(filename, O_RDWR | O_CREAT, 0); - #else -- fd = open(filename, O_RDWR | O_CREAT, DEFFILEMODE); -+ fd = open(filename, O_RDWR | O_CREAT, DEFFILEMOD); - #endif - - if ( fd < 0) { -@@ -934,16 +950,21 @@ static void start_server(int transport) - exit(0); - } - -- if (transport==OBEX_TRANS_BLUETOOTH && 0 > obexftp_sdp_register()) -- { -- //OBEX_Cleanup(handle); -- fprintf(stderr, "register to SDP Server failed.\n"); -- exit(0); -- } -- else -- { -- use_sdp = 1; -- } -+#ifdef HAVE_BLUETOOTH -+ if (transport==OBEX_TRANS_BLUETOOTH) -+ { -+ if (0 > obexftp_sdp_register()) -+ { -+ //OBEX_Cleanup(handle); -+ fprintf(stderr, "register to SDP Server failed.\n"); -+ exit(0); -+ } -+ else -+ { -+ use_sdp = 1; -+ } -+ } -+#endif - - reset: - handle = OBEX_Init(transport, obex_event, 0); -@@ -963,12 +984,14 @@ reset: - exit(-1); - } - break; -+#ifdef HAVE_BLUETOOTH - case OBEX_TRANS_BLUETOOTH: - if (0 > BtOBEX_ServerRegister(handle, bt_src, channel)) { - perror("failed to register bluetooth server"); - exit(-1); - } - break; -+#endif - case OBEX_TRANS_IRDA: - if (0 > IrOBEX_ServerRegister(handle, "")) { - perror("failed to register IrDA server"); -@@ -1002,11 +1025,13 @@ reset: - goto reset; - } - -+#ifdef HAVE_BLUETOOTH - if (use_sdp) - { - fprintf(stderr, "sdp unregister\n"); - obexftp_sdp_unregister(); - } -+#endif - - } - |