From: Luiz A. v. D. <lui...@gm...> - 2010-10-18 13:23:51
|
Hi, On Mon, Oct 18, 2010 at 3:56 PM, Hendrik Sattler <po...@he...> wrote: >> Yep, it should be sent to the client too, good catch. Now about >> obex_object_getcmd we can fix it in another patch since Im afraid >> there quite a few places where we need to fix it, so for now Im going >> to use 0. > > OK. Will you do a patch for that or shall I? Feel free to do it. >> The patch now looks like this: >> >> diff --git a/lib/obex_main.c b/lib/obex_main.c >> index 0a72c14..c16aa04 100644 >> --- a/lib/obex_main.c >> +++ b/lib/obex_main.c >> @@ -379,7 +379,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; >> } > > OK. I will be testing a little bit more to make sure it doesn't break client code since now it send ABORT in any mode, Johan appeared to be concerned of generating events from inside the cancel function which calls back into the application code, but we already have been doing this for !nice and I don't think there is currently a better way to signal the application to free resources used to handle the request. -- Luiz Augusto von Dentz Computer Engineer |