Re: [gupnp] handling of sequence numbers in gupnp-service-proxy.c



HI Sven,

On Thu, Mar 26, 2009 at 2:12 PM, Sven Neumann <s neumann phase-zero de> wrote:
> Hi,
>
> On Wed, 2009-03-25 at 20:04 +0200, Zeeshan Ali (Khattak) wrote:
>
>> > If we receive messages out-of-order, does that really mean that we have
>> > missed a message? Isn't it possible that the message order is changed
>> > due to asynchronous code?
>>
>>   No, that will only happen because of some bug in libsoup since
>> SoupServer is guaranteed to call the server_handler for each message
>> synchronously as they arrive (assuming they are on the same
>> connection, which afaik is true in our case). I am telling you this
>> after confirming my assumption with Dan Winship on IRC.
>
> Attached is a small test case that my colleague wrote. It sets up a
> SoupServer listening on a local port and then uses a SoupSession to send
> messages to this port. These messages have a sequence number and a
> random payload of up to 5MB. The server looks at the sequence number of
> the incoming messages and will abort if the messages are received out of
> order. This test fails reliably after a few messages.
>
> As far as I can see this setup is comparable to what GUPnP does. So is
> this really a bug in libsoup? I think not. IMO the bug is that
> GUPnPService makes a wrong assumption about the libsoup behavior here.

   As I said before, the assumption has been confirmed by libsoup
developer to be true so i don't see why gupnp is the guilty party
here. I already agreed that the message should not be discarded, which
should solve the issue you were/are having? We still need to only
resubscribe when messages come out of order because upnp specs
mandates this and relying on this particular behavior is the simplest
way to achieve this.

> Or is there something wrong about our test case?

  No, IMHO just a bug in libsoup. You might want to file a bug on
libsoup for this and attach the test app.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124
--
To unsubscribe send a mail to gupnp+unsubscribe\@o-hand.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]