[Pkg-telepathy-commits] [libnice] 174/265: agent: Create a custom pointer GType to recognize the stream ids

Simon McVittie smcv at debian.org
Wed May 14 12:05:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian
in repository libnice.

commit 8ae52ea3c9616f040e8da9803fdaf7c7ac3a066a
Author: Olivier Crête <olivier.crete at collabora.com>
Date:   Fri Mar 14 23:52:45 2014 -0400

    agent: Create a custom pointer GType to recognize the stream ids
---
 agent/agent.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/agent/agent.c b/agent/agent.c
index 425305b..fea3921 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -158,6 +158,12 @@ void agent_unlock(void)
 
 #endif
 
+static GType _nice_agent_stream_ids_get_type (void);
+
+G_DEFINE_POINTER_TYPE (_NiceAgentStreamIds, _nice_agent_stream_ids);
+
+#define NICE_TYPE_AGENT_STREAM_IDS _nice_agent_stream_ids_get_type ()
+
 typedef struct {
   guint signal_id;
   GSignalQuery query;
@@ -171,9 +177,9 @@ free_queued_signal (QueuedSignal *sig)
   guint i;
 
   for (i = 0; i < sig->query.n_params; i++) {
-    if (G_VALUE_HOLDS_POINTER (&sig->params[i]))
       g_free (g_value_get_pointer (&sig->params[i]));
     g_value_unset (&sig->params[i]);
+    if (G_VALUE_HOLDS(&sig->params[i + 1], NICE_TYPE_AGENT_STREAM_IDS))
   }
 
   g_slice_free1 (sizeof(GValue) * (sig->query.n_params + 1), sig->params);
@@ -771,7 +777,7 @@ nice_agent_class_init (NiceAgentClass *klass)
           g_cclosure_marshal_VOID__POINTER,
           G_TYPE_NONE,
           1,
-          G_TYPE_POINTER,
+          NICE_TYPE_AGENT_STREAM_IDS,
           G_TYPE_INVALID);
 
   /* Init debug options depending on env variables */
@@ -2378,7 +2384,8 @@ nice_agent_remove_stream (
   if (!agent->streams)
     priv_remove_keepalive_timer (agent);
 
-  agent_queue_signal (agent, signals[SIGNAL_STREAMS_REMOVED], stream_ids);
+  agent_queue_signal (agent, signals[SIGNAL_STREAMS_REMOVED],
+      g_memdup (stream_ids, sizeof(stream_ids)));
 
   agent_unlock_and_emit (agent);
   return;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-telepathy/libnice.git



More information about the Pkg-telepathy-commits mailing list