[PATCH 2/2] gwobex: fix misuse of OBEX_SetCustomData/OBEX_GetCustomData

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luiz Augusto von Dentz <luiz.dentz-von@xxxxxxxxx>

Those function should only be used in case of custom transport which is
not the case since we are using fd transport here.

To fix that it now uses OBEX_SetUserData/OBEX_GetUserData which are not
associate with any transport in particular.
---
 gwobex/gw-obex.c   |    2 +-
 gwobex/obex-priv.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gwobex/gw-obex.c b/gwobex/gw-obex.c
index e656692..4481212 100644
--- a/gwobex/gw-obex.c
+++ b/gwobex/gw-obex.c
@@ -343,7 +343,7 @@ GwObex *gw_obex_setup_fd(int fd, const gchar *uuid, gint uuid_len,
     ctx->mutex = g_mutex_new();
 #endif
 
-    OBEX_SetCustomData(handle, ctx);
+    OBEX_SetUserData(handle, ctx);
 
     debug("Connecting to OBEX service\n");
     if (!gw_obex_connect(ctx, uuid, uuid_len)) {
diff --git a/gwobex/obex-priv.c b/gwobex/obex-priv.c
index 76a9599..aba7dd7 100644
--- a/gwobex/obex-priv.c
+++ b/gwobex/obex-priv.c
@@ -514,7 +514,7 @@ static void obex_writestream(GwObex *ctx, obex_object_t *object) {
 
 static void obex_event_handler(obex_t *handle, obex_object_t *object, int mode,
                                int event, int obex_cmd, int obex_rsp) {
-    GwObex *ctx = OBEX_GetCustomData(handle);
+    GwObex *ctx = OBEX_GetUserData(handle);
     switch (event) {
         case OBEX_EV_ABORT:
             debug("OBEX_EV_ABORT\n");
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux