[gupnp] gupnp-service-proxy: remove subscription timeout on subscribe
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gupnp] gupnp-service-proxy: remove subscription timeout on subscribe
- Date: Sat, 8 Nov 2014 15:18:17 +0000 (UTC)
commit 20eed980f64a0042e6bfc340c80d982ddf04ff1c
Author: Sven Neumann <neumann teufel de>
Date: Wed Oct 8 13:03:08 2014 +0200
gupnp-service-proxy: remove subscription timeout on subscribe
We have seen crashes in subscription_expire() where user_data
pointed to invalid memory. I do not see an obvious way how this
can have happened, but it seems like a good idea to always
remove the subscription timeout when sending a new subscription
request.
Signed-off-by: Sven Neumann <neumann teufel de>
libgupnp/gupnp-service-proxy.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 7a48ac9..015e926 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -2278,7 +2278,13 @@ subscribe (GUPnPServiceProxy *proxy)
const char *server_url;
char *sub_url, *delivery_url, *timeout;
- context = gupnp_service_info_get_context (GUPNP_SERVICE_INFO (proxy));
+ /* Remove subscription timeout */
+ if (proxy->priv->subscription_timeout_src) {
+ g_source_destroy (proxy->priv->subscription_timeout_src);
+ proxy->priv->subscription_timeout_src = NULL;
+ }
+
+ context = gupnp_service_info_get_context (GUPNP_SERVICE_INFO (proxy));
/* Create subscription message */
sub_url = gupnp_service_info_get_event_subscription_url
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]