summaryrefslogtreecommitdiff
path: root/socket
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2014-03-29 21:23:40 -0400
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-03-30 02:12:41 -0400
commit075d90655a1ea5118e5a8821249d2a5a9982ec9b (patch)
tree51c37c2b358a6077f4ad3716ffd73ef83f74bac2 /socket
parentd916e63a623d339e4f4f3671f6a87020bfab4179 (diff)
downloadlibnice-075d90655a1ea5118e5a8821249d2a5a9982ec9b.tar.gz
turn: Don't overwrite source, destroy it first
Diffstat (limited to 'socket')
-rw-r--r--socket/turn.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/socket/turn.c b/socket/turn.c
index a3a920d..ad01c84 100644
--- a/socket/turn.c
+++ b/socket/turn.c
@@ -1567,6 +1567,10 @@ priv_schedule_tick (TurnPriv *priv)
timeout = stun_timer_remainder (&current_create_permission_msg->timer);
if (timeout > 0) {
+ if (priv->tick_source_create_permission) {
+ g_source_destroy (priv->tick_source_create_permission);
+ g_source_unref (priv->tick_source_create_permission);
+ }
priv->tick_source_create_permission =
priv_timeout_add_with_context (priv, FALSE,
timeout,