[farsight2/master] Put everything into build

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:24:45 PST 2008


---
 fs-upnp-simple-igd.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs-upnp-simple-igd.c b/fs-upnp-simple-igd.c
index 60768cc..f2c263d 100644
--- a/fs-upnp-simple-igd.c
+++ b/fs-upnp-simple-igd.c
@@ -398,6 +398,9 @@ _cp_service_unavail (GUPnPControlPoint *cp,
 static gboolean
 fs_upnp_simple_igd_build (FsUpnpSimpleIgd *self)
 {
+  if (!self->priv->main_context)
+    self->priv->main_context = g_main_context_default ();
+
   self->priv->gupnp_context = gupnp_context_new (self->priv->main_context,
       NULL, 0, NULL);
   if (!self->priv->gupnp_context)
@@ -425,10 +428,7 @@ fs_upnp_simple_igd_new (GMainContext *main_context)
 {
   FsUpnpSimpleIgd *self = g_object_new (FS_TYPE_UPNP_SIMPLE_IGD, NULL);
 
-  if (!main_context)
-    main_context = g_main_context_default ();
-
-  self->priv->main_context = g_main_context_ref (main_context);
+  self->priv->main_context = main_context;
 
   fs_upnp_simple_igd_build (self);
 
-- 
1.5.6.5




More information about the farsight-commits mailing list