1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
$NetBSD: patch-ab,v 1.2 2013/03/15 08:25:15 plunky Exp $
--- libsyncml/transports/obex_client.c.orig 2007-10-16 13:25:31.000000000 +0000
+++ libsyncml/transports/obex_client.c
@@ -26,7 +26,12 @@
#include <libsyncml/sml_transport_internals.h>
#ifdef ENABLE_BLUETOOTH
+#ifdef HAVE_BLUETOOTH_BLUETOOTH_H
#include <bluetooth/bluetooth.h>
+#else
+#define COMPAT_BLUEZ
+#include <bluetooth.h>
+#endif
#endif
#include "obex_client.h"
@@ -326,7 +331,7 @@ static void smlTransportObexClientConnec
} else if (env->type == SML_OBEX_TYPE_USB) {
smlTrace(TRACE_INTERNAL, "connecting to usb interface %i", env->port);
- obex_intf_cnt = OBEX_FindInterfaces(env->obexhandle, &obex_intf);
+ obex_intf_cnt = OBEX_EnumerateInterfaces(env->obexhandle);
smlTrace(TRACE_INTERNAL, "found %i interfaces", obex_intf_cnt);
if (obex_intf_cnt <= 0) {
@@ -336,7 +341,8 @@ static void smlTransportObexClientConnec
smlErrorSet(&error, SML_ERROR_GENERIC, "Unable to find the USB interface number %i", env->port);
goto error;
} else {
- if (OBEX_InterfaceConnect(env->obexhandle, &obex_intf[env->port]) < 0) {
+ obex_intf = OBEX_GetInterfaceByIndex(env->obexhandle, env->port);
+ if (OBEX_InterfaceConnect(env->obexhandle, obex_intf) < 0) {
smlErrorSet(&error, SML_ERROR_GENERIC, "Unable to connect to the interface");
goto error;
}
|