From: Luiz Augusto von Dentz <luiz.dentz-...@nokia.com>

Also deliver ABORT signal so the user application can free whatever
resource being use to handle the request.
---
 lib/obex_main.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/lib/obex_main.c b/lib/obex_main.c
index 26bf04b..aff3aaf 100644
--- a/lib/obex_main.c
+++ b/lib/obex_main.c
@@ -446,7 +446,11 @@ 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;
+
+               if (self->state == STATE_IDLE)
+                       /* 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
Openobex-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/openobex-users

Reply via email to