[Pkg-telepathy-commits] [libnice] 227/265: conncheck: Factor out stopping connectivity checks

Simon McVittie smcv at debian.org
Wed May 14 12:05:11 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 891ce53e08afc8da6b65987c9fdcdad8b9598fbb
Author: Olivier Crête <olivier.crete at collabora.com>
Date:   Thu Apr 24 20:27:38 2014 -0400

    conncheck: Factor out stopping connectivity checks
---
 agent/conncheck.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/agent/conncheck.c b/agent/conncheck.c
index 5c55317..8115d1b 100644
--- a/agent/conncheck.c
+++ b/agent/conncheck.c
@@ -1406,6 +1406,17 @@ void conn_check_free_item (gpointer data, gpointer user_data)
   g_slice_free (CandidateCheckPair, pair);
 }
 
+static void
+conn_check_stop (NiceAgent *agent)
+{
+  if (agent->conncheck_timer_source == NULL)
+    return;
+
+  g_source_destroy (agent->conncheck_timer_source);
+  g_source_unref (agent->conncheck_timer_source);
+  agent->conncheck_timer_source = NULL;
+}
+
 /*
  * Frees all resources of all connectivity checks.
  */
@@ -1423,11 +1434,7 @@ void conn_check_free (NiceAgent *agent)
     }
   }
 
-  if (agent->conncheck_timer_source != NULL) {
-    g_source_destroy (agent->conncheck_timer_source);
-    g_source_unref (agent->conncheck_timer_source);
-    agent->conncheck_timer_source = NULL;
-  }
+  conn_check_stop (agent);
 }
 
 /*

-- 
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