Am Dienstag, 19. Juli 2011, 21:24:14 schrieb Johan Hedberg: > Hi, > > On Tue, Jul 19, 2011, Johan Hedberg wrote: > > On Tue, Jul 19, 2011, Jakub Adamek wrote: > > > Some profiles (BIP) put CONTINUE in a final response packet. > > > OpenOBEX currently assumes that a response is completed > > > when a packet arrives with a different status than CONTINUE. > > > The proposed patch changes this to check instead whether a packet > > > arrives that has the final bit set in the status. > > > --- > > > > > > lib/obex_client.c | 6 +++--- > > > 1 files changed, 3 insertions(+), 3 deletions(-) > > > > <snip> > > > > > /* Are we done yet? */ > > > > > > - if (rsp == OBEX_RSP_CONTINUE) { > > > + if (!final) { > > > > > > DEBUG(3, "Continue...\n"); > > > > > > self->object->continue_received = 1; > > > > I think this has the potential to break a lot of things. If you check > > the IrOBEX spec you'll see that in non-SRM cases *all* response packets > > *always* have the final bit set, including all CONTINUE packets. So your > > "if (!final)" test would never evaluate to true. > > I forgot to mention that if this is about an OBEX Get operation then you > may be able to determine the final packet by checking for the presence > of an end-of-body header. However if this is a Put operation I don't see > how you could reliably distinguish the last packet if all of them have > CONTINUE as their response code.
I'm with Johan here. The BIP-1.0 spec actually says that only "intermediate packets" have the CONTINUE and the example actually use SUCCESS as the final reponse code. You probably refer to the GetStatus command. However, all the GetStatus commands in the example are _one_ object, not multiple. HS ------------------------------------------------------------------------------ Magic Quadrant for Content-Aware Data Loss Prevention Research study explores the data loss prevention market. Includes in-depth analysis on the changes within the DLP market, and the criteria used to evaluate the strengths and weaknesses of these DLP solutions. http://www.accelacomm.com/jaw/sfnl/114/51385063/ _______________________________________________ Openobex-users mailing list Openobex-users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/openobex-users