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



Hi,

On Thu, 2009-03-26 at 14:27 +0200, Zeeshan Ali (Khattak) wrote:

> > 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 understood that the libsoup developer confirmed this on the basis that
all messages are sent on the same HTTP connection. Is this a valid
assumption to be made for GUPnPService notification events ?

>  I already agreed that the message should not be discarded, which
> should solve the issue you were/are having?

Well, since we are hitting this quite frequently, the service proxy
would still resubscribe over and over again and I would be happier if
that could be avoided. But for now I've attached a small patch that only
changes the code to accept the message instead of discarding it.

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

I'll do this as soon as we figured out that that problem is actually in
libsoup.


Thanks for your feedback,
Sven

>From c68a07fcad7a7a9b928d8c61d47adbc3ca3762eb Mon Sep 17 00:00:00 2001
From: Sven Neumann <s neumann phase-zero de>
Date: Thu, 26 Mar 2009 13:58:12 +0100
Subject: [PATCH] don't discard the message when receiving an unexpected sequence number

---
 libgupnp/gupnp-service-proxy.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 248cc25..b1b8ea9 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -1492,11 +1492,6 @@ server_handler (SoupServer        *soup_server,
                 /* Oops, we missed a notify. Resubscribe .. */
                 unsubscribe (proxy);
                 subscribe (proxy);
-
-                /* Message was OK otherwise */
-                soup_message_set_status (msg, SOUP_STATUS_OK);
-
-                return;
         }
 
         /* Increment our own event sequence number */
-- 
1.5.6.3



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