[farsight2/master] Create udpsocket factory in nice-thread class
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:26:26 PST 2008
---
transmitters/nice/fs-nice-thread.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/transmitters/nice/fs-nice-thread.c b/transmitters/nice/fs-nice-thread.c
index 7a4744c..99ebd88 100644
--- a/transmitters/nice/fs-nice-thread.c
+++ b/transmitters/nice/fs-nice-thread.c
@@ -35,6 +35,8 @@
#include "fs-nice-transmitter.h"
#include "fs-nice-thread.h"
+#include <nice/nice.h>
+
#include <string.h>
#include <sys/types.h>
@@ -60,6 +62,9 @@ struct _FsNiceThreadPrivate
guint compatibility_mode;
+ NiceUDPSocketFactory udpfactory;
+
+
GMutex *mutex;
/* Everything below is protected by the mutex */
@@ -154,6 +159,8 @@ fs_nice_thread_init (FsNiceThread *self)
/* member init */
self->priv = FS_NICE_THREAD_GET_PRIVATE (self);
+ nice_udp_bsd_socket_factory_init (&self->priv->udpfactory);
+
self->priv->mutex = g_mutex_new ();
self->priv->main_context = g_main_context_new ();
@@ -183,6 +190,8 @@ fs_nice_thread_finalize (GObject *object)
g_mutex_free (self->priv->mutex);
+ nice_udp_socket_factory_close (&self->priv->udpfactory);
+
parent_class->finalize (object);
}
--
1.5.6.5
More information about the farsight-commits
mailing list