diff options
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/gnunet-arm.c | 13 | ||||
-rw-r--r-- | src/arm/gnunet-service-arm.c | 4 | ||||
-rw-r--r-- | src/arm/gnunet-service-arm.h | 12 | ||||
-rw-r--r-- | src/arm/gnunet-service-arm_interceptor.c | 26 | ||||
-rw-r--r-- | src/arm/test_exponential_backoff.c | 8 |
5 files changed, 31 insertions, 32 deletions
diff --git a/src/arm/gnunet-arm.c b/src/arm/gnunet-arm.c index cf5e1592a..7e108cb41 100644 --- a/src/arm/gnunet-arm.c +++ b/src/arm/gnunet-arm.c | |||
@@ -138,7 +138,8 @@ static struct GNUNET_TIME_Relative timeout; | |||
138 | * @param cls closure, unused | 138 | * @param cls closure, unused |
139 | * @param tc context, unused | 139 | * @param tc context, unused |
140 | */ | 140 | */ |
141 | static void cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | 141 | static void |
142 | cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
142 | 143 | ||
143 | 144 | ||
144 | /** | 145 | /** |
@@ -305,9 +306,8 @@ cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
305 | { | 306 | { |
306 | GNUNET_ARM_stop_service (h, "arm", | 307 | GNUNET_ARM_stop_service (h, "arm", |
307 | (0 == | 308 | (0 == |
308 | timeout. | 309 | timeout.rel_value) ? STOP_TIMEOUT_ARM : |
309 | rel_value) ? STOP_TIMEOUT_ARM : timeout, | 310 | timeout, &confirm_cb, "arm"); |
310 | &confirm_cb, "arm"); | ||
311 | return; | 311 | return; |
312 | } | 312 | } |
313 | break; | 313 | break; |
@@ -336,9 +336,8 @@ cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
336 | { | 336 | { |
337 | GNUNET_CLIENT_service_test (test, cfg, | 337 | GNUNET_CLIENT_service_test (test, cfg, |
338 | (0 == | 338 | (0 == |
339 | timeout. | 339 | timeout.rel_value) ? TEST_TIMEOUT : |
340 | rel_value) ? TEST_TIMEOUT : timeout, | 340 | timeout, &confirm_task, test); |
341 | &confirm_task, test); | ||
342 | return; | 341 | return; |
343 | } | 342 | } |
344 | break; | 343 | break; |
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index ddccb7fa0..e85b2eb12 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -722,8 +722,8 @@ delayed_restart_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
722 | { | 722 | { |
723 | lowestRestartDelay = | 723 | lowestRestartDelay = |
724 | GNUNET_TIME_relative_min (lowestRestartDelay, | 724 | GNUNET_TIME_relative_min (lowestRestartDelay, |
725 | GNUNET_TIME_absolute_get_remaining (pos-> | 725 | GNUNET_TIME_absolute_get_remaining |
726 | restartAt)); | 726 | (pos->restartAt)); |
727 | } | 727 | } |
728 | } | 728 | } |
729 | pos = pos->next; | 729 | pos = pos->next; |
diff --git a/src/arm/gnunet-service-arm.h b/src/arm/gnunet-service-arm.h index bdb5d2c93..e8d125b92 100644 --- a/src/arm/gnunet-service-arm.h +++ b/src/arm/gnunet-service-arm.h | |||
@@ -35,8 +35,9 @@ | |||
35 | * @param lsocks -1 terminated list of listen sockets to pass (systemd style), or NULL | 35 | * @param lsocks -1 terminated list of listen sockets to pass (systemd style), or NULL |
36 | * @return GNUNET_OK on success | 36 | * @return GNUNET_OK on success |
37 | */ | 37 | */ |
38 | int start_service (struct GNUNET_SERVER_Client *client, const char *servicename, | 38 | int |
39 | const int *lsocks); | 39 | start_service (struct GNUNET_SERVER_Client *client, const char *servicename, |
40 | const int *lsocks); | ||
40 | 41 | ||
41 | /** | 42 | /** |
42 | * Stop listening for connections to a service. | 43 | * Stop listening for connections to a service. |
@@ -45,9 +46,10 @@ int start_service (struct GNUNET_SERVER_Client *client, const char *servicename, | |||
45 | * @return GNUNET_OK if we stopped to listen, GNUNET_NO if we were | 46 | * @return GNUNET_OK if we stopped to listen, GNUNET_NO if we were |
46 | * not listening | 47 | * not listening |
47 | */ | 48 | */ |
48 | int stop_listening (const char *serviceName); | 49 | int |
50 | stop_listening (const char *serviceName); | ||
49 | 51 | ||
50 | void prepareServices (const struct GNUNET_CONFIGURATION_Handle | 52 | void |
51 | *configurationHandle); | 53 | prepareServices (const struct GNUNET_CONFIGURATION_Handle *configurationHandle); |
52 | 54 | ||
53 | #endif | 55 | #endif |
diff --git a/src/arm/gnunet-service-arm_interceptor.c b/src/arm/gnunet-service-arm_interceptor.c index 6d417ba37..59f8ac30b 100644 --- a/src/arm/gnunet-service-arm_interceptor.c +++ b/src/arm/gnunet-service-arm_interceptor.c | |||
@@ -356,8 +356,8 @@ closeClientAndServiceSockets (struct ForwardedConnection *fc, int reason) | |||
356 | * @param cls callback data, struct ForwardedConnection for the communication between client and service | 356 | * @param cls callback data, struct ForwardedConnection for the communication between client and service |
357 | * @param tc context | 357 | * @param tc context |
358 | */ | 358 | */ |
359 | static void receiveFromClient (void *cls, | 359 | static void |
360 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 360 | receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
361 | 361 | ||
362 | 362 | ||
363 | /** | 363 | /** |
@@ -366,15 +366,15 @@ static void receiveFromClient (void *cls, | |||
366 | * @param cls callback data, struct ForwardedConnection for the communication between client and service | 366 | * @param cls callback data, struct ForwardedConnection for the communication between client and service |
367 | * @param tc scheduler context | 367 | * @param tc scheduler context |
368 | */ | 368 | */ |
369 | static void receiveFromService (void *cls, | 369 | static void |
370 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 370 | receiveFromService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
371 | 371 | ||
372 | 372 | ||
373 | /** | 373 | /** |
374 | * | 374 | * |
375 | */ | 375 | */ |
376 | static void start_forwarding (void *cls, | 376 | static void |
377 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 377 | start_forwarding (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
378 | 378 | ||
379 | 379 | ||
380 | 380 | ||
@@ -497,8 +497,7 @@ receiveFromService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
497 | GNUNET_a2s (fc->listen_info->service_addr, | 497 | GNUNET_a2s (fc->listen_info->service_addr, |
498 | fc->listen_info->service_addr_len), | 498 | fc->listen_info->service_addr_len), |
499 | (unsigned long long) GNUNET_TIME_relative_min (fc->back_off, | 499 | (unsigned long long) GNUNET_TIME_relative_min (fc->back_off, |
500 | rem). | 500 | rem).rel_value); |
501 | rel_value); | ||
502 | #endif | 501 | #endif |
503 | rem = GNUNET_TIME_absolute_get_remaining (fc->timeout); | 502 | rem = GNUNET_TIME_absolute_get_remaining (fc->timeout); |
504 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task); | 503 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task); |
@@ -584,8 +583,7 @@ forwardToService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
584 | GNUNET_a2s (fc->listen_info->service_addr, | 583 | GNUNET_a2s (fc->listen_info->service_addr, |
585 | fc->listen_info->service_addr_len), | 584 | fc->listen_info->service_addr_len), |
586 | (unsigned long long) GNUNET_TIME_relative_min (fc->back_off, | 585 | (unsigned long long) GNUNET_TIME_relative_min (fc->back_off, |
587 | rem). | 586 | rem).rel_value); |
588 | rel_value); | ||
589 | #endif | 587 | #endif |
590 | rem = GNUNET_TIME_absolute_get_remaining (fc->timeout); | 588 | rem = GNUNET_TIME_absolute_get_remaining (fc->timeout); |
591 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task); | 589 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task); |
@@ -913,8 +911,8 @@ stop_listening (const char *serviceName) | |||
913 | * @param cls callback data, struct ServiceListeningInfo describing a listen socket | 911 | * @param cls callback data, struct ServiceListeningInfo describing a listen socket |
914 | * @param tc context | 912 | * @param tc context |
915 | */ | 913 | */ |
916 | static void acceptConnection (void *cls, | 914 | static void |
917 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 915 | acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
918 | 916 | ||
919 | 917 | ||
920 | static void | 918 | static void |
@@ -948,8 +946,8 @@ accept_and_forward (struct ServiceListeningInfo *serviceListeningInfo) | |||
948 | return; | 946 | return; |
949 | } | 947 | } |
950 | GNUNET_break (GNUNET_OK == | 948 | GNUNET_break (GNUNET_OK == |
951 | GNUNET_NETWORK_socket_close (serviceListeningInfo-> | 949 | GNUNET_NETWORK_socket_close |
952 | listeningSocket)); | 950 | (serviceListeningInfo->listeningSocket)); |
953 | start_service (NULL, serviceListeningInfo->serviceName, NULL); | 951 | start_service (NULL, serviceListeningInfo->serviceName, NULL); |
954 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Service `%s' started\n"), | 952 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Service `%s' started\n"), |
955 | fc->listen_info->serviceName); | 953 | fc->listen_info->serviceName); |
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c index 04c52d0eb..3b68039b1 100644 --- a/src/arm/test_exponential_backoff.c +++ b/src/arm/test_exponential_backoff.c | |||
@@ -251,8 +251,8 @@ arm_notify_stop (void *cls, int success) | |||
251 | } | 251 | } |
252 | 252 | ||
253 | 253 | ||
254 | static void kill_task (void *cbData, | 254 | static void |
255 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 255 | kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc); |
256 | 256 | ||
257 | 257 | ||
258 | static void | 258 | static void |
@@ -273,8 +273,8 @@ arm_notify (void *cls, int success) | |||
273 | } | 273 | } |
274 | 274 | ||
275 | 275 | ||
276 | static void kill_task (void *cbData, | 276 | static void |
277 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 277 | kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc); |
278 | 278 | ||
279 | 279 | ||
280 | static void | 280 | static void |