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



Hi Sven!

On Wed, Mar 25, 2009 at 7:38 PM, Sven Neumann <s neumann phase-zero de> wrote:
> Hi,
>
> On Wed, 2009-03-25 at 17:37 +0200, Zeeshan Ali (Khattak) wrote:
>
>>   The behavior seems to be dictated by UPnP spec: "To repair an event
>> subscription, e.g., if a subscriber has missed one or more event
>> messages, a subscriber must unsubscribe and re-subscribe. By doing so,
>> the subscriber will get a new subscription identifier, a new initial
>> event message, and a new event key."  p69 UPnP Device Architecture v1.
>
> This brings up some questions:
>
> 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.

> In the cases where we observed this, the
> Service sent out a LastChange event immidiately followed by much simpler
> notification event. It looks like the notification event arrived at the
> ServiceProxy before the LastChange event.

   Then there must be a bug in libsoup?

> If the above is not correct, how can it possibly happen that a
> notification message does not arrive at the subscriber?

   It's TCP so I can't imagine how this will happen either. It's just
that UPnP requires us to do this so I am not sure we can decide not to
do so.

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