[farsight2/master] Revert "Use GInitiallyUnowned for fs-nice-thread"

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


This reverts commit 48e70218512d2021944c30a9143b5ede7a4ba073.
---
 transmitters/nice/fs-nice-stream-transmitter.c |    2 ++
 transmitters/nice/fs-nice-thread.c             |    5 +++--
 transmitters/nice/fs-nice-thread.h             |    4 ++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index 4b67827..cd5891e 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -983,6 +983,8 @@ fs_nice_stream_transmitter_build (FsNiceStreamTransmitter *self,
 
     g_object_set_data (G_OBJECT (thread), "nice-thread", thread);
 
+    g_object_unref (thread);
+
     if (self->priv->stun_ip && self->priv->stun_port)
       g_object_set (agent,
           "stun-server", self->priv->stun_ip,
diff --git a/transmitters/nice/fs-nice-thread.c b/transmitters/nice/fs-nice-thread.c
index 0866539..2f6b4a4 100644
--- a/transmitters/nice/fs-nice-thread.c
+++ b/transmitters/nice/fs-nice-thread.c
@@ -112,7 +112,7 @@ fs_nice_thread_register_type (FsPlugin *module)
   };
 
   type = g_type_module_register_type (G_TYPE_MODULE (module),
-      G_TYPE_INITIALLY_UNOWNED, "FsNiceThread", &info, 0);
+      G_TYPE_OBJECT, "FsNiceThread", &info, 0);
 
   return type;
 }
@@ -221,10 +221,11 @@ fs_nice_thread_add_weak_object (FsNiceThread *self,
 {
   g_object_weak_ref (G_OBJECT (object), (GWeakNotify) g_object_unref, self);
 
-  g_object_ref_sink (self);
+  g_object_ref (self);
 }
 
 
+
 static gpointer
 fs_nice_thread_main_thread (gpointer data)
 {
diff --git a/transmitters/nice/fs-nice-thread.h b/transmitters/nice/fs-nice-thread.h
index 62f8697..e858fb5 100644
--- a/transmitters/nice/fs-nice-thread.h
+++ b/transmitters/nice/fs-nice-thread.h
@@ -62,7 +62,7 @@ typedef struct _FsNiceThreadPrivate FsNiceThreadPrivate;
 
 struct _FsNiceThreadClass
 {
-  GInitiallyUnownedClass parent_class;
+  GObjectClass parent_class;
 };
 
 /**
@@ -72,7 +72,7 @@ struct _FsNiceThreadClass
  */
 struct _FsNiceThread
 {
-  GInitiallyUnowned parent;
+  GObject parent;
 
   /*< private >*/
   FsNiceThreadPrivate *priv;
-- 
1.5.6.5




More information about the farsight-commits mailing list