diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-07-26 21:20:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-07-26 21:20:11 +0000 |
commit | 7bc466bbdb8b64cac68c5ee59eb7ab6b9d85c420 (patch) | |
tree | dc415457e57f9cfda58eb22ca400a941ebcf602e /src/util/test_service.c | |
parent | 4f8ba34b32328bd99b2f0c2ff9a2372712022b32 (diff) | |
download | gnunet-7bc466bbdb8b64cac68c5ee59eb7ab6b9d85c420.tar.gz gnunet-7bc466bbdb8b64cac68c5ee59eb7ab6b9d85c420.zip |
const-ing of config-handles
Diffstat (limited to 'src/util/test_service.c')
-rw-r--r-- | src/util/test_service.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/util/test_service.c b/src/util/test_service.c index 233c23ccf..e8e3f8741 100644 --- a/src/util/test_service.c +++ b/src/util/test_service.c | |||
@@ -74,7 +74,7 @@ build_msg (void *cls, size_t size, void *buf) | |||
74 | static void | 74 | static void |
75 | ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 75 | ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
76 | { | 76 | { |
77 | struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 77 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
78 | struct GNUNET_CLIENT_Connection *client; | 78 | struct GNUNET_CLIENT_Connection *client; |
79 | 79 | ||
80 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service confirmed running\n"); | 80 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service confirmed running\n"); |
@@ -108,17 +108,18 @@ static void | |||
108 | runner (void *cls, | 108 | runner (void *cls, |
109 | struct GNUNET_SCHEDULER_Handle *sched, | 109 | struct GNUNET_SCHEDULER_Handle *sched, |
110 | struct GNUNET_SERVER_Handle *server, | 110 | struct GNUNET_SERVER_Handle *server, |
111 | struct GNUNET_CONFIGURATION_Handle *cfg) | 111 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
112 | { | 112 | { |
113 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service initializing\n"); | 113 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Service initializing\n"); |
114 | GNUNET_SERVER_add_handlers (server, myhandlers); | 114 | GNUNET_SERVER_add_handlers (server, myhandlers); |
115 | GNUNET_CLIENT_service_test (sched, | 115 | GNUNET_CLIENT_service_test (sched, |
116 | "test_service", | 116 | "test_service", |
117 | cfg, GNUNET_TIME_UNIT_SECONDS, &ready, cfg); | 117 | cfg, GNUNET_TIME_UNIT_SECONDS, &ready, (void*) cfg); |
118 | } | 118 | } |
119 | 119 | ||
120 | static void | 120 | static void |
121 | term (void *cls, struct GNUNET_CONFIGURATION_Handle *cfg) | 121 | term (void *cls, |
122 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
122 | { | 123 | { |
123 | int *ok = cls; | 124 | int *ok = cls; |
124 | *ok = 0; | 125 | *ok = 0; |
@@ -157,7 +158,7 @@ check () | |||
157 | static void | 158 | static void |
158 | ready6 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | 159 | ready6 (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) |
159 | { | 160 | { |
160 | struct GNUNET_CONFIGURATION_Handle *cfg = cls; | 161 | const struct GNUNET_CONFIGURATION_Handle *cfg = cls; |
161 | struct GNUNET_CLIENT_Connection *client; | 162 | struct GNUNET_CLIENT_Connection *client; |
162 | 163 | ||
163 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "V6 ready\n"); | 164 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "V6 ready\n"); |
@@ -176,13 +177,13 @@ static void | |||
176 | runner6 (void *cls, | 177 | runner6 (void *cls, |
177 | struct GNUNET_SCHEDULER_Handle *sched, | 178 | struct GNUNET_SCHEDULER_Handle *sched, |
178 | struct GNUNET_SERVER_Handle *server, | 179 | struct GNUNET_SERVER_Handle *server, |
179 | struct GNUNET_CONFIGURATION_Handle *cfg) | 180 | const struct GNUNET_CONFIGURATION_Handle *cfg) |
180 | { | 181 | { |
181 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Initializing v6 service\n"); | 182 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Initializing v6 service\n"); |
182 | GNUNET_SERVER_add_handlers (server, myhandlers); | 183 | GNUNET_SERVER_add_handlers (server, myhandlers); |
183 | GNUNET_CLIENT_service_test (sched, | 184 | GNUNET_CLIENT_service_test (sched, |
184 | "test_service6", | 185 | "test_service6", |
185 | cfg, GNUNET_TIME_UNIT_SECONDS, &ready6, cfg); | 186 | cfg, GNUNET_TIME_UNIT_SECONDS, &ready6, (void*) cfg); |
186 | } | 187 | } |
187 | 188 | ||
188 | /** | 189 | /** |
@@ -252,7 +253,8 @@ static void | |||
252 | start_stop_main (void *cls, | 253 | start_stop_main (void *cls, |
253 | struct GNUNET_SCHEDULER_Handle *sched, | 254 | struct GNUNET_SCHEDULER_Handle *sched, |
254 | char *const *args, | 255 | char *const *args, |
255 | const char *cfgfile, struct GNUNET_CONFIGURATION_Handle *cfg) | 256 | const char *cfgfile, |
257 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
256 | { | 258 | { |
257 | int *ret = cls; | 259 | int *ret = cls; |
258 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 260 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |