diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-16 13:56:18 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-16 13:56:18 +0000 |
commit | 5419748cc47ea35b77a616ff269aae822cab8cea (patch) | |
tree | 6304d8f3e9fd4b8880eb37ccd87226962e7f5856 /src/ats | |
parent | c2e92effeacc3cb83fa928427d0ae172c7257d82 (diff) | |
download | gnunet-5419748cc47ea35b77a616ff269aae822cab8cea.tar.gz gnunet-5419748cc47ea35b77a616ff269aae822cab8cea.zip |
get quota config
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/gnunet-service-ats.c | 2 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_scheduling.c | 18 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_scheduling.h | 4 |
3 files changed, 21 insertions, 3 deletions
diff --git a/src/ats/gnunet-service-ats.c b/src/ats/gnunet-service-ats.c index 14bb963b9..d3f818653 100644 --- a/src/ats/gnunet-service-ats.c +++ b/src/ats/gnunet-service-ats.c | |||
@@ -131,7 +131,7 @@ run (void *cls, struct GNUNET_SERVER_Handle *server, | |||
131 | }; | 131 | }; |
132 | GAS_reservations_init (); | 132 | GAS_reservations_init (); |
133 | GAS_performance_init (server); | 133 | GAS_performance_init (server); |
134 | GAS_scheduling_init (server); | 134 | GAS_scheduling_init (server, cfg); |
135 | GAS_addresses_init (); | 135 | GAS_addresses_init (); |
136 | GNUNET_SERVER_disconnect_notify (server, | 136 | GNUNET_SERVER_disconnect_notify (server, |
137 | &client_disconnect_handler, | 137 | &client_disconnect_handler, |
diff --git a/src/ats/gnunet-service-ats_scheduling.c b/src/ats/gnunet-service-ats_scheduling.c index 9eebe2c3e..8125b8664 100644 --- a/src/ats/gnunet-service-ats_scheduling.c +++ b/src/ats/gnunet-service-ats_scheduling.c | |||
@@ -73,6 +73,10 @@ static struct SchedulingClient *sc_tail; | |||
73 | */ | 73 | */ |
74 | static struct GNUNET_SERVER_NotificationContext *nc; | 74 | static struct GNUNET_SERVER_NotificationContext *nc; |
75 | 75 | ||
76 | static unsigned long long total_quota_in; | ||
77 | |||
78 | static unsigned long long total_quota_out; | ||
79 | |||
76 | 80 | ||
77 | /** | 81 | /** |
78 | * Find the scheduling client associated with the given | 82 | * Find the scheduling client associated with the given |
@@ -355,10 +359,22 @@ GAS_handle_address_destroyed (void *cls, struct GNUNET_SERVER_Client *client, | |||
355 | * Initialize scheduling subsystem. | 359 | * Initialize scheduling subsystem. |
356 | * | 360 | * |
357 | * @param server handle to our server | 361 | * @param server handle to our server |
362 | * @param cfg configuration to use | ||
358 | */ | 363 | */ |
359 | void | 364 | void |
360 | GAS_scheduling_init (struct GNUNET_SERVER_Handle *server) | 365 | GAS_scheduling_init (struct GNUNET_SERVER_Handle *server, |
366 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
361 | { | 367 | { |
368 | GNUNET_assert (GNUNET_OK == | ||
369 | GNUNET_CONFIGURATION_get_value_number (cfg, | ||
370 | "core", | ||
371 | "TOTAL_QUOTA_IN", | ||
372 | &total_quota_in)); | ||
373 | GNUNET_assert (GNUNET_OK == | ||
374 | GNUNET_CONFIGURATION_get_value_number (cfg, | ||
375 | "core", | ||
376 | "TOTAL_QUOTA_OUT", | ||
377 | &total_quota_out)); | ||
362 | nc = GNUNET_SERVER_notification_context_create (server, 128); | 378 | nc = GNUNET_SERVER_notification_context_create (server, 128); |
363 | } | 379 | } |
364 | 380 | ||
diff --git a/src/ats/gnunet-service-ats_scheduling.h b/src/ats/gnunet-service-ats_scheduling.h index 8d6fa977d..273126fff 100644 --- a/src/ats/gnunet-service-ats_scheduling.h +++ b/src/ats/gnunet-service-ats_scheduling.h | |||
@@ -117,9 +117,11 @@ GAS_handle_address_destroyed (void *cls, struct GNUNET_SERVER_Client *client, | |||
117 | * Initialize scheduling subsystem. | 117 | * Initialize scheduling subsystem. |
118 | * | 118 | * |
119 | * @param server handle to our server | 119 | * @param server handle to our server |
120 | * @param cfg configuration to use | ||
120 | */ | 121 | */ |
121 | void | 122 | void |
122 | GAS_scheduling_init (struct GNUNET_SERVER_Handle *server); | 123 | GAS_scheduling_init (struct GNUNET_SERVER_Handle *server, |
124 | const struct GNUNET_CONFIGURATION_Handle *cfg); | ||
123 | 125 | ||
124 | 126 | ||
125 | /** | 127 | /** |