From: Luiz Augusto von Dentz <[email protected]>
Also deliver ABORT signal so the user application can free whatever
resource being use to handle the request.
---
lib/obex_main.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/lib/obex_main.c b/lib/obex_main.c
index 26bf04b..0cadb2f 100644
--- a/lib/obex_main.c
+++ b/lib/obex_main.c
@@ -446,7 +446,10 @@ int obex_cancelrequest(obex_t *self, int nice)
obex_object_delete(object);
self->object->abort = TRUE;
- self->state = STATE_REC;
+ self->state = self->mode == MODE_SRV ? STATE_IDLE : STATE_REC;
+
+ /* Deliver event will delete the object */
+ obex_deliver_event(self, OBEX_EV_ABORT, 0, 0, TRUE);
return 0;
}
--
1.7.1
------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:
WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users