[gupnp] Fix missing event notifications
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] Fix missing event notifications
- Date: Sun, 2 Dec 2012 00:15:18 +0000 (UTC)
commit 4f9e022f2a0ef53ace05a70d66fa9f985a917e7a
Author: Jens Georg <mail jensge org>
Date: Sun Dec 2 00:58:50 2012 +0100
Fix missing event notifications
If a client used the way to respond to a NOTIFY call described in UDA 1.1:
HTTP/1.1 200 OK
and nothing else, libsoup doesn't know that there was no body to come and was
running into a timeout, not sending the other messages queued on this
connection since we request the connection to be kept alive.
By adding "Connection: close" to the NOTIFY message, libsoup will know that
the message is done since the client closes the connection.
If a client misbehaves and doesn't close the connection, we're still having a
problem. This should be considered a work-around and a nicer solution with
libsoup needs to be found.
libgupnp/gupnp-service.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c
index 8c1709e..23bd61d 100644
--- a/libgupnp/gupnp-service.c
+++ b/libgupnp/gupnp-service.c
@@ -1932,6 +1932,8 @@ notify_subscriber (gpointer key,
/* Queue */
data->pending_messages = g_list_prepend (data->pending_messages, msg);
+ soup_message_headers_append (msg->request_headers,
+ "Connection", "close");
session = gupnp_service_get_session (data->service);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]