Linux bluetooth development
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 2/2] gwobex: fix misuse of OBEX_SetCustomData/OBEX_GetCustomData
Date: Tue, 17 Aug 2010 16:58:30 +0300	[thread overview]
Message-ID: <1282053510-18102-2-git-send-email-luiz.dentz@gmail.com> (raw)
In-Reply-To: <1282053510-18102-1-git-send-email-luiz.dentz@gmail.com>

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

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


  reply	other threads:[~2010-08-17 13:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 13:58 [PATCH 1/2] Fix aborting capability scripts making them zombies processes Luiz Augusto von Dentz
2010-08-17 13:58 ` Luiz Augusto von Dentz [this message]
2010-08-17 14:19   ` [PATCH 2/2] gwobex: fix misuse of OBEX_SetCustomData/OBEX_GetCustomData Johan Hedberg
2010-08-17 14:18 ` [PATCH 1/2] Fix aborting capability scripts making them zombies processes Johan Hedberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1282053510-18102-2-git-send-email-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox