--- lib/obex.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/obex.c b/lib/obex.c index 5ca14a2..dcf0169 100644 --- a/lib/obex.c +++ b/lib/obex.c @@ -475,9 +475,13 @@ LIB_SYMBOL int CALLAPI OBEX_TransportDisconnect(obex_t *self) { DEBUG(4, "\n"); - obex_return_val_if_fail(self != NULL, -1); - obex_transport_disconnect_request(self); + + if (self->trans.fd != INVALID_SOCKET) + obex_transport_disconnect_request(self); + else if (self->trans.serverfd != INVALID_SOCKET) + obex_transport_disconnect_server(self); + return 0; } -- 1.7.5.3 ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Openobex-users mailing list Openobex-users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/openobex-users