[maemo-commits] [maemo-commits] r16562 - projects/connectivity/osso-gwobex/trunk/src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Nov 4 13:29:31 EET 2008
Author: jh
Date: 2008-11-04 13:29:30 +0200 (Tue, 04 Nov 2008)
New Revision: 16562

Modified:
   projects/connectivity/osso-gwobex/trunk/src/obex-priv.c
Log:
commit fb3586f04163444e71f75d9a843793de49b15e9d
Author: Johan Hedberg <johan.hedberg at nokia.com>
Date:   Fri Oct 31 08:45:35 2008 +0200

    Improve the dc_cb/xfer callback workaround

    It's in anycase not safe to call these two callbacks at the same time here, but
    in case some code does use the dc_cb for calling gw_obex_close (which is quite
    a rational thing to do in this case) give it a chance to work.


Modified: projects/connectivity/osso-gwobex/trunk/src/obex-priv.c
===================================================================
--- projects/connectivity/osso-gwobex/trunk/src/obex-priv.c	2008-11-04 11:29:00 UTC (rev 16561)
+++ projects/connectivity/osso-gwobex/trunk/src/obex-priv.c	2008-11-04 11:29:30 UTC (rev 16562)
@@ -637,10 +637,10 @@
         debug("gw_obex_cb: error or connection closed\n");
         obex_link_error(ctx);
         GW_OBEX_UNLOCK(ctx);
-        if (ctx->dc_cb)
-            ctx->dc_cb(ctx, ctx->dc_data);
         if (ctx->xfer && ctx->xfer->cb)
             ctx->xfer->cb(ctx->xfer, ctx->xfer->cb_data);
+	else if (ctx->dc_cb)
+            ctx->dc_cb(ctx, ctx->dc_data);
         return FALSE;
     }
 


More information about the maemo-commits mailing list