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 | |
parent | 21264a59434a5b18b4f5e85e735a2d3ec5c3c6c6 (diff) | |
download | gnunet-52ae7e53f6b8dfd26612e4e9f0830918fd1ee312.tar.gz gnunet-52ae7e53f6b8dfd26612e4e9f0830918fd1ee312.zip |
-misc cleanups
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.c | 5 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_addresses.h | 2 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_feedback.c | 1 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_performance.c | 59 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_performance.h | 21 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_plugins.c | 7 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_plugins.h | 5 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_reservations.c | 3 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_scheduling.c | 3 |
9 files changed, 42 insertions, 64 deletions
diff --git a/src/ats/gnunet-service-ats_addresses.c b/src/ats/gnunet-service-ats_addresses.c index bbd2fda2d..5715bfbbd 100644 --- a/src/ats/gnunet-service-ats_addresses.c +++ b/src/ats/gnunet-service-ats_addresses.c | |||
@@ -25,14 +25,9 @@ | |||
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_ats_service.h" | ||
29 | #include "gnunet-service-ats.h" | ||
30 | #include "gnunet-service-ats_addresses.h" | 28 | #include "gnunet-service-ats_addresses.h" |
31 | #include "gnunet-service-ats_normalization.h" | ||
32 | #include "gnunet-service-ats_performance.h" | 29 | #include "gnunet-service-ats_performance.h" |
33 | #include "gnunet-service-ats_plugins.h" | 30 | #include "gnunet-service-ats_plugins.h" |
34 | #include "gnunet-service-ats_scheduling.h" | ||
35 | #include "gnunet-service-ats_reservations.h" | ||
36 | 31 | ||
37 | 32 | ||
38 | /** | 33 | /** |
diff --git a/src/ats/gnunet-service-ats_addresses.h b/src/ats/gnunet-service-ats_addresses.h index 864cdec19..89d5ceed0 100644 --- a/src/ats/gnunet-service-ats_addresses.h +++ b/src/ats/gnunet-service-ats_addresses.h | |||
@@ -30,8 +30,6 @@ | |||
30 | #include "gnunet_util_lib.h" | 30 | #include "gnunet_util_lib.h" |
31 | #include "gnunet_ats_service.h" | 31 | #include "gnunet_ats_service.h" |
32 | #include "gnunet-service-ats.h" | 32 | #include "gnunet-service-ats.h" |
33 | #include "gnunet_statistics_service.h" | ||
34 | #include "ats.h" | ||
35 | 33 | ||
36 | /** | 34 | /** |
37 | * NOTE: Do not change this documentation. This documentation is based on | 35 | * NOTE: Do not change this documentation. This documentation is based on |
diff --git a/src/ats/gnunet-service-ats_feedback.c b/src/ats/gnunet-service-ats_feedback.c index 72f4aa039..c2c899996 100644 --- a/src/ats/gnunet-service-ats_feedback.c +++ b/src/ats/gnunet-service-ats_feedback.c | |||
@@ -24,7 +24,6 @@ | |||
24 | * @author Christian Grothoff | 24 | * @author Christian Grothoff |
25 | */ | 25 | */ |
26 | #include "platform.h" | 26 | #include "platform.h" |
27 | #include "gnunet-service-ats.h" | ||
28 | #include "gnunet-service-ats_plugins.h" | 27 | #include "gnunet-service-ats_plugins.h" |
29 | #include "gnunet-service-ats_feedback.h" | 28 | #include "gnunet-service-ats_feedback.h" |
30 | #include "ats.h" | 29 | #include "ats.h" |
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 | ||
diff --git a/src/ats/gnunet-service-ats_performance.h b/src/ats/gnunet-service-ats_performance.h index 24e9ec1ee..bd4cb2258 100644 --- a/src/ats/gnunet-service-ats_performance.h +++ b/src/ats/gnunet-service-ats_performance.h | |||
@@ -31,16 +31,6 @@ | |||
31 | #include "gnunet_ats_service.h" | 31 | #include "gnunet_ats_service.h" |
32 | #include "ats.h" | 32 | #include "ats.h" |
33 | 33 | ||
34 | /** | ||
35 | * Register a new performance client. | ||
36 | * | ||
37 | * @param client handle of the new client | ||
38 | * @param flag flag specifying the type of the client | ||
39 | */ | ||
40 | void | ||
41 | GAS_performance_add_client (struct GNUNET_SERVER_Client *client, | ||
42 | enum StartFlag flag); | ||
43 | |||
44 | 34 | ||
45 | /** | 35 | /** |
46 | * Transmit the given performance information to all performance | 36 | * Transmit the given performance information to all performance |
@@ -72,6 +62,17 @@ GAS_performance_notify_all_clients (const struct GNUNET_PeerIdentity *peer, | |||
72 | 62 | ||
73 | 63 | ||
74 | /** | 64 | /** |
65 | * Register a new performance client. | ||
66 | * | ||
67 | * @param client handle of the new client | ||
68 | * @param flag flag specifying the type of the client | ||
69 | */ | ||
70 | void | ||
71 | GAS_performance_add_client (struct GNUNET_SERVER_Client *client, | ||
72 | enum StartFlag flag); | ||
73 | |||
74 | |||
75 | /** | ||
75 | * Initialize performance subsystem. | 76 | * Initialize performance subsystem. |
76 | * | 77 | * |
77 | * @param server handle to our server | 78 | * @param server handle to our server |
diff --git a/src/ats/gnunet-service-ats_plugins.c b/src/ats/gnunet-service-ats_plugins.c index fed3c8496..47761fc14 100644 --- a/src/ats/gnunet-service-ats_plugins.c +++ b/src/ats/gnunet-service-ats_plugins.c | |||
@@ -25,19 +25,12 @@ | |||
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet_util_lib.h" | ||
29 | #include "gnunet_ats_service.h" | ||
30 | #include "gnunet-service-ats.h" | ||
31 | #include "gnunet_statistics_service.h" | ||
32 | #include "gnunet_ats_plugin.h" | 28 | #include "gnunet_ats_plugin.h" |
33 | #include "gnunet-service-ats_addresses.h" | ||
34 | #include "gnunet-service-ats_performance.h" | 29 | #include "gnunet-service-ats_performance.h" |
35 | #include "gnunet-service-ats_preferences.h" | 30 | #include "gnunet-service-ats_preferences.h" |
36 | #include "gnunet-service-ats_plugins.h" | 31 | #include "gnunet-service-ats_plugins.h" |
37 | #include "gnunet-service-ats_scheduling.h" | 32 | #include "gnunet-service-ats_scheduling.h" |
38 | #include "gnunet-service-ats_normalization.h" | 33 | #include "gnunet-service-ats_normalization.h" |
39 | #include "ats.h" | ||
40 | |||
41 | 34 | ||
42 | 35 | ||
43 | /** | 36 | /** |
diff --git a/src/ats/gnunet-service-ats_plugins.h b/src/ats/gnunet-service-ats_plugins.h index d100890f8..dd85bd361 100644 --- a/src/ats/gnunet-service-ats_plugins.h +++ b/src/ats/gnunet-service-ats_plugins.h | |||
@@ -27,12 +27,7 @@ | |||
27 | #ifndef GNUNET_SERVICE_ATS_PLUGINS_H | 27 | #ifndef GNUNET_SERVICE_ATS_PLUGINS_H |
28 | #define GNUNET_SERVICE_ATS_PLUGINS_H | 28 | #define GNUNET_SERVICE_ATS_PLUGINS_H |
29 | 29 | ||
30 | #include "gnunet_util_lib.h" | ||
31 | #include "gnunet_ats_service.h" | ||
32 | #include "gnunet-service-ats.h" | ||
33 | #include "gnunet-service-ats_addresses.h" | 30 | #include "gnunet-service-ats_addresses.h" |
34 | #include "gnunet_statistics_service.h" | ||
35 | #include "ats.h" | ||
36 | 31 | ||
37 | 32 | ||
38 | /** | 33 | /** |
diff --git a/src/ats/gnunet-service-ats_reservations.c b/src/ats/gnunet-service-ats_reservations.c index 6e6c2b258..2f3c1f5f1 100644 --- a/src/ats/gnunet-service-ats_reservations.c +++ b/src/ats/gnunet-service-ats_reservations.c | |||
@@ -17,7 +17,6 @@ | |||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | |||
21 | /** | 20 | /** |
22 | * @file ats/gnunet-service-ats_reservations.c | 21 | * @file ats/gnunet-service-ats_reservations.c |
23 | * @brief ats service, inbound bandwidth reservation management | 22 | * @brief ats service, inbound bandwidth reservation management |
@@ -36,7 +35,7 @@ | |||
36 | 35 | ||
37 | 36 | ||
38 | /** | 37 | /** |
39 | * Map of peer identities to 'struct GNUNET_BANDWIDTH_Tracker *'s | 38 | * Map of peer identities to `struct GNUNET_BANDWIDTH_Tracker *`s |
40 | */ | 39 | */ |
41 | static struct GNUNET_CONTAINER_MultiPeerMap *trackers; | 40 | static struct GNUNET_CONTAINER_MultiPeerMap *trackers; |
42 | 41 | ||
diff --git a/src/ats/gnunet-service-ats_scheduling.c b/src/ats/gnunet-service-ats_scheduling.c index e1e60c063..59ac1be93 100644 --- a/src/ats/gnunet-service-ats_scheduling.c +++ b/src/ats/gnunet-service-ats_scheduling.c | |||
@@ -25,7 +25,6 @@ | |||
25 | * @author Christian Grothoff | 25 | * @author Christian Grothoff |
26 | */ | 26 | */ |
27 | #include "platform.h" | 27 | #include "platform.h" |
28 | #include "gnunet-service-ats.h" | ||
29 | #include "gnunet-service-ats_addresses.h" | 28 | #include "gnunet-service-ats_addresses.h" |
30 | #include "gnunet-service-ats_scheduling.h" | 29 | #include "gnunet-service-ats_scheduling.h" |
31 | #include "ats.h" | 30 | #include "ats.h" |
@@ -99,7 +98,7 @@ GAS_scheduling_transmit_address_suggestion (const struct GNUNET_PeerIdentity *pe | |||
99 | if (NULL == my_client) | 98 | if (NULL == my_client) |
100 | return; | 99 | return; |
101 | GNUNET_STATISTICS_update (GSA_stats, | 100 | GNUNET_STATISTICS_update (GSA_stats, |
102 | "# address suggestions made", | 101 | "# address suggestions made", |
103 | 1, | 102 | 1, |
104 | GNUNET_NO); | 103 | GNUNET_NO); |
105 | msg.header.size = htons (sizeof (struct AddressSuggestionMessage)); | 104 | msg.header.size = htons (sizeof (struct AddressSuggestionMessage)); |