---
lib/obex.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/obex.c b/lib/obex.c
index 50ed7e4..3e1f71c 100644
--- a/lib/obex.c
+++ b/lib/obex.c
@@ -476,9 +476,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.4.1
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users