[maemo-commits] [maemo-commits] r16561 - projects/connectivity/osso-gwobex/trunk/src
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Nov 4 13:29:02 EET 2008
- Previous message: [maemo-commits] r16560 - projects/connectivity/osso-gwobex/trunk/src
- Next message: [maemo-commits] r16562 - projects/connectivity/osso-gwobex/trunk/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: jh Date: 2008-11-04 13:29:00 +0200 (Tue, 04 Nov 2008) New Revision: 16561 Modified: projects/connectivity/osso-gwobex/trunk/src/obex-priv.c Log: ommit 4e8bdccf6cdbfe3d2e71f84e073d110a781fe8cc Author: Johan Hedberg <johan.hedberg at nokia.com> Date: Fri Oct 31 00:05:24 2008 +0200 Change xfer callback and dc_cb order in the event of a disconnection This is mainly working around a bug in the gwobex API. Since it doesn't have proper refcounting the xfer callback can free the gwobex ctx and so the second callback fails. It could of course happen in the other direction too (dc_cb calls gw_obex_close) but since no known code is using dc_cb it's at least a little safer this way. Modified: projects/connectivity/osso-gwobex/trunk/src/obex-priv.c =================================================================== --- projects/connectivity/osso-gwobex/trunk/src/obex-priv.c 2008-11-04 11:26:45 UTC (rev 16560) +++ projects/connectivity/osso-gwobex/trunk/src/obex-priv.c 2008-11-04 11:29:00 UTC (rev 16561) @@ -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); - if (ctx->dc_cb) - ctx->dc_cb(ctx, ctx->dc_data); return FALSE; }
- Previous message: [maemo-commits] r16560 - projects/connectivity/osso-gwobex/trunk/src
- Next message: [maemo-commits] r16562 - projects/connectivity/osso-gwobex/trunk/src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]