From: Luiz A. v. D. <lui...@gm...> - 2010-12-09 09:35:35
|
From: Luiz Augusto von Dentz <lui...@no...> 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 |