aboutsummaryrefslogtreecommitdiff
path: root/src/ats/ats_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-10 11:09:42 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-10 11:09:42 +0000
commit376b5f749c03e1ff149c2e8248eed9bec928872a (patch)
tree7c44864219de6d7d77bdaec34c9e4b7aaf199647 /src/ats/ats_api.c
parent9767d2478ccb8dcc3152cb617d84cd4cec2097c3 (diff)
downloadgnunet-376b5f749c03e1ff149c2e8248eed9bec928872a.tar.gz
gnunet-376b5f749c03e1ff149c2e8248eed9bec928872a.zip
dead code elimination
Diffstat (limited to 'src/ats/ats_api.c')
-rw-r--r--src/ats/ats_api.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/ats/ats_api.c b/src/ats/ats_api.c
index 48f15a73f..53ab6e9ca 100644
--- a/src/ats/ats_api.c
+++ b/src/ats/ats_api.c
@@ -140,19 +140,21 @@ set_bw_connections (void *cls, const GNUNET_HashCode * key, void *value)
140 ar->bandwidth_out = sbc->bw_out; 140 ar->bandwidth_out = sbc->bw_out;
141 GNUNET_BANDWIDTH_tracker_update_quota (&ar->available_recv_window, 141 GNUNET_BANDWIDTH_tracker_update_quota (&ar->available_recv_window,
142 ar->bandwidth_in); 142 ar->bandwidth_in);
143 sbc->atc->alloc_cb (sbc->atc->alloc_cb_cls, 143 if (NULL != sbc->atc->alloc_cb)
144 (const struct GNUNET_PeerIdentity *) key, 144 sbc->atc->alloc_cb (sbc->atc->alloc_cb_cls,
145 ar->plugin_name, ar->session, ar->plugin_addr, 145 (const struct GNUNET_PeerIdentity *) key,
146 ar->plugin_addr_len, ar->bandwidth_out, ar->bandwidth_in); 146 ar->plugin_name, ar->session, ar->plugin_addr,
147 ar->plugin_addr_len, ar->bandwidth_out, ar->bandwidth_in);
147 } 148 }
148 else if (ntohl (ar->bandwidth_out.value__) > 0) 149 else if (ntohl (ar->bandwidth_out.value__) > 0)
149 { 150 {
150 ar->bandwidth_in = GNUNET_BANDWIDTH_value_init (0); 151 ar->bandwidth_in = GNUNET_BANDWIDTH_value_init (0);
151 ar->bandwidth_out = GNUNET_BANDWIDTH_value_init (0); 152 ar->bandwidth_out = GNUNET_BANDWIDTH_value_init (0);
152 sbc->atc->alloc_cb (sbc->atc->alloc_cb_cls, 153 if (NULL != sbc->atc->alloc_cb)
153 (const struct GNUNET_PeerIdentity *) key, 154 sbc->atc->alloc_cb (sbc->atc->alloc_cb_cls,
154 ar->plugin_name, ar->session, ar->plugin_addr, 155 (const struct GNUNET_PeerIdentity *) key,
155 ar->plugin_addr_len, ar->bandwidth_out, ar->bandwidth_in); 156 ar->plugin_name, ar->session, ar->plugin_addr,
157 ar->plugin_addr_len, ar->bandwidth_out, ar->bandwidth_in);
156 } 158 }
157 return GNUNET_YES; 159 return GNUNET_YES;
158} 160}