[grilo-plugins] upnp: Really unregister disappearing sources
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] upnp: Really unregister disappearing sources
- Date: Fri, 21 Jun 2013 07:52:08 +0000 (UTC)
commit 1dd612f7040c1c7728b4cc6ce1f12b38ae17214c
Author: Emanuele Aina <emanuele aina collabora com>
Date: Thu Jun 20 12:18:53 2013 +0200
upnp: Really unregister disappearing sources
Unregister the corresponding GrlSource when a UPnP server is being
turned off. It seems that the _unregister() call got lost in 39437df.
https://bugzilla.gnome.org/show_bug.cgi?id=702730
src/upnp/grl-upnp.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/upnp/grl-upnp.c b/src/upnp/grl-upnp.c
index d433755..e937ef3 100644
--- a/src/upnp/grl-upnp.c
+++ b/src/upnp/grl-upnp.c
@@ -521,7 +521,14 @@ device_unavailable_cb (GUPnPControlPoint *cp,
/* Check first if source is registered */
source = grl_registry_lookup_source (registry, source_id);
if (source) {
+ GError *error = NULL;
GRL_DEBUG ("Unregistered source %s", source_id);
+ grl_registry_unregister_source (registry, source, &error);
+ if (error)
+ {
+ g_warning ("Failed to unregister source %s: %s", source_id, error->message);
+ g_error_free (error);
+ }
g_free (source_id);
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]