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.

Johan

------------------------------------------------------------------------------
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

Reply via email to