notify only once
authorMatthias Wachs <wachs@net.in.tum.de>
Tue, 19 Nov 2013 13:34:29 +0000 (13:34 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Tue, 19 Nov 2013 13:34:29 +0000 (13:34 +0000)
src/ats/libgnunet_plugin_ats_proportional.c

index 6118329b64b39be4b69ca719c9bbc162a4d2f621..ab259c1182bb94f287af9482645a25bc2b721658 100644 (file)
@@ -879,16 +879,16 @@ distribute_bandwidth_in_network (struct GAS_PROPORTIONAL_Handle *s,
     if (NULL != s->env->info_cb)
       s->env->info_cb(s->env->info_cb_cls, GAS_OP_SOLVE_STOP,
           GAS_STAT_SUCCESS, GAS_INFO_PROP_ALL);
+    if (NULL != s->env->info_cb)
+      s->env->info_cb(s->env->info_cb_cls, GAS_OP_SOLVE_UPDATE_NOTIFICATION_START,
+          GAS_STAT_SUCCESS, GAS_INFO_PROP_ALL);
     for (i = 0; i < s->network_count; i++)
     {
-      if (NULL != s->env->info_cb)
-        s->env->info_cb(s->env->info_cb_cls, GAS_OP_SOLVE_UPDATE_NOTIFICATION_START,
-            GAS_STAT_SUCCESS, GAS_INFO_PROP_ALL);
       propagate_bandwidth(s, &s->network_entries[i], address_except);
-      if (NULL != s->env->info_cb)
-        s->env->info_cb(s->env->info_cb_cls, GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP,
-            GAS_STAT_SUCCESS, GAS_INFO_PROP_ALL);
     }
+    if (NULL != s->env->info_cb)
+      s->env->info_cb(s->env->info_cb_cls, GAS_OP_SOLVE_UPDATE_NOTIFICATION_STOP,
+          GAS_STAT_SUCCESS, GAS_INFO_PROP_ALL);
   }
 }