diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-02-05 19:55:31 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-02-05 19:55:31 +0000 |
commit | 52ae7e53f6b8dfd26612e4e9f0830918fd1ee312 (patch) | |
tree | 8dd8981bcdbe150e55657a4d751516ac14a77840 /src/ats/gnunet-service-ats_performance.c | |
parent | 21264a59434a5b18b4f5e85e735a2d3ec5c3c6c6 (diff) | |
download | gnunet-52ae7e53f6b8dfd26612e4e9f0830918fd1ee312.tar.gz gnunet-52ae7e53f6b8dfd26612e4e9f0830918fd1ee312.zip |
-misc cleanups
Diffstat (limited to 'src/ats/gnunet-service-ats_performance.c')
-rw-r--r-- | src/ats/gnunet-service-ats_performance.c | 59 |
1 files changed, 29 insertions, 30 deletions
diff --git a/src/ats/gnunet-service-ats_performance.c b/src/ats/gnunet-service-ats_performance.c index 3f064308a..9237b0711 100644 --- a/src/ats/gnunet-service-ats_performance.c +++ b/src/ats/gnunet-service-ats_performance.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include "gnunet-service-ats.h" | 27 | #include "gnunet-service-ats.h" |
28 | #include "gnunet-service-ats_addresses.h" | 28 | #include "gnunet-service-ats_addresses.h" |
29 | #include "gnunet-service-ats_performance.h" | 29 | #include "gnunet-service-ats_performance.h" |
30 | #include "gnunet-service-ats_reservations.h" | ||
31 | #include "ats.h" | 30 | #include "ats.h" |
32 | 31 | ||
33 | 32 | ||
@@ -60,17 +59,17 @@ static struct GNUNET_SERVER_NotificationContext *nc_pic; | |||
60 | * @param bandwidth_out assigned outbound bandwidth | 59 | * @param bandwidth_out assigned outbound bandwidth |
61 | * @param bandwidth_in assigned inbound bandwidth | 60 | * @param bandwidth_in assigned inbound bandwidth |
62 | */ | 61 | */ |
63 | void | 62 | static void |
64 | GAS_performance_notify_client (struct GNUNET_SERVER_Client *client, | 63 | notify_client (struct GNUNET_SERVER_Client *client, |
65 | const struct GNUNET_PeerIdentity *peer, | 64 | const struct GNUNET_PeerIdentity *peer, |
66 | const char *plugin_name, | 65 | const char *plugin_name, |
67 | const void *plugin_addr, | 66 | const void *plugin_addr, |
68 | size_t plugin_addr_len, | 67 | size_t plugin_addr_len, |
69 | int active, | 68 | int active, |
70 | const struct GNUNET_ATS_Information *atsi, | 69 | const struct GNUNET_ATS_Information *atsi, |
71 | uint32_t atsi_count, | 70 | uint32_t atsi_count, |
72 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 71 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
73 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) | 72 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) |
74 | { | 73 | { |
75 | struct PeerInformationMessage *msg; | 74 | struct PeerInformationMessage *msg; |
76 | size_t plugin_name_length = strlen (plugin_name) + 1; | 75 | size_t plugin_name_length = strlen (plugin_name) + 1; |
@@ -146,15 +145,15 @@ GAS_performance_notify_all_clients (const struct GNUNET_PeerIdentity *peer, | |||
146 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 145 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
147 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) | 146 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) |
148 | { | 147 | { |
149 | GAS_performance_notify_client (NULL, | 148 | notify_client (NULL, |
150 | peer, | 149 | peer, |
151 | plugin_name, | 150 | plugin_name, |
152 | plugin_addr, | 151 | plugin_addr, |
153 | plugin_addr_len, | 152 | plugin_addr_len, |
154 | active, | 153 | active, |
155 | atsi, atsi_count, | 154 | atsi, atsi_count, |
156 | bandwidth_out, | 155 | bandwidth_out, |
157 | bandwidth_in); | 156 | bandwidth_in); |
158 | GNUNET_STATISTICS_update (GSA_stats, | 157 | GNUNET_STATISTICS_update (GSA_stats, |
159 | "# performance updates given to clients", | 158 | "# performance updates given to clients", |
160 | 1, | 159 | 1, |
@@ -198,15 +197,15 @@ peerinfo_it (void *cls, | |||
198 | plugin_name, | 197 | plugin_name, |
199 | (unsigned int) ntohl (bandwidth_out.value__), | 198 | (unsigned int) ntohl (bandwidth_out.value__), |
200 | (unsigned int) ntohl (bandwidth_in.value__)); | 199 | (unsigned int) ntohl (bandwidth_in.value__)); |
201 | GAS_performance_notify_client (client, | 200 | notify_client (client, |
202 | id, | 201 | id, |
203 | plugin_name, | 202 | plugin_name, |
204 | plugin_addr, | 203 | plugin_addr, |
205 | plugin_addr_len, | 204 | plugin_addr_len, |
206 | active, | 205 | active, |
207 | atsi, atsi_count, | 206 | atsi, atsi_count, |
208 | bandwidth_out, | 207 | bandwidth_out, |
209 | bandwidth_in); | 208 | bandwidth_in); |
210 | } | 209 | } |
211 | 210 | ||
212 | 211 | ||