Assign source out of the for loop
authoralex <alex@meetecho.com>
Wed, 5 Jun 2019 09:45:17 +0000 (11:45 +0200)
committeralex <alex@meetecho.com>
Wed, 5 Jun 2019 09:45:17 +0000 (11:45 +0200)
socket/udp-turn.c

index ddf4aa8..ce6a8fd 100644 (file)
@@ -1195,11 +1195,12 @@ priv_binding_timeout (gpointer data)
   }
 
   nice_debug ("Permission is about to timeout, sending binding renewal");
+  source = g_main_current_source ();
 
   /* find current binding and mark it for renewal */
   for (i = priv->channels ; i; i = i->next) {
     ChannelBinding *b = i->data;
-    source = g_main_current_source ();
+
     if (b->timeout_source == source) {
       b->renew = TRUE;