[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35176 - gnunet/src/ats
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35176 - gnunet/src/ats |
Date: |
Sun, 8 Feb 2015 20:43:46 +0100 |
Author: grothoff
Date: 2015-02-08 20:43:46 +0100 (Sun, 08 Feb 2015)
New Revision: 35176
Modified:
gnunet/src/ats/plugin_ats_proportional.c
Log:
-simplify flow
Modified: gnunet/src/ats/plugin_ats_proportional.c
===================================================================
--- gnunet/src/ats/plugin_ats_proportional.c 2015-02-08 19:43:00 UTC (rev
35175)
+++ gnunet/src/ats/plugin_ats_proportional.c 2015-02-08 19:43:46 UTC (rev
35176)
@@ -1127,26 +1127,25 @@
cur = get_active_address (s,
peer);
- if (NULL != cur)
- {
- LOG (GNUNET_ERROR_TYPE_INFO,
- "Disabling %s address %p for peer `%s'\n",
- (GNUNET_NO == cur->active) ? "inactive" : "active",
- cur,
- GNUNET_i2s (&cur->peer));
+ if (NULL == cur)
+ return;
+ LOG (GNUNET_ERROR_TYPE_INFO,
+ "Disabling %s address %p for peer `%s'\n",
+ (GNUNET_NO == cur->active) ? "inactive" : "active",
+ cur,
+ GNUNET_i2s (&cur->peer));
- /* Disabling current address */
- asi = cur->solver_information;
- cur_net = asi->network;
- asi->activated = GNUNET_TIME_UNIT_ZERO_ABS;
- cur->active = GNUNET_NO; /* No active any longer */
- cur->assigned_bw_in = 0; /* no bandwidth assigned */
- cur->assigned_bw_out = 0; /* no bandwidth assigned */
-
- address_decrement_active (s, cur_net);
-
- distribute_bandwidth_in_network (s, cur_net);
- }
+ /* Disabling current address */
+ asi = cur->solver_information;
+ cur_net = asi->network;
+ asi->activated = GNUNET_TIME_UNIT_ZERO_ABS;
+ cur->active = GNUNET_NO; /* No active any longer */
+ cur->assigned_bw_in = 0; /* no bandwidth assigned */
+ cur->assigned_bw_out = 0; /* no bandwidth assigned */
+ address_decrement_active (s,
+ cur_net);
+ distribute_bandwidth_in_network (s,
+ cur_net);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35176 - gnunet/src/ats,
gnunet <=