diff options
Diffstat (limited to 'src/arm')
-rw-r--r-- | src/arm/arm_api.c | 14 | ||||
-rw-r--r-- | src/arm/test_exponential_backoff.c | 12 |
2 files changed, 13 insertions, 13 deletions
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index c352cbdae..bb4b355fc 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c | |||
@@ -128,7 +128,7 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
128 | } | 128 | } |
129 | } | 129 | } |
130 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); | 130 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); |
131 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 131 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock); |
132 | GNUNET_free (shutdown_ctx); | 132 | GNUNET_free (shutdown_ctx); |
133 | return; | 133 | return; |
134 | } | 134 | } |
@@ -142,7 +142,7 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
142 | /* ARM is not shutting down, well, report the error and be done with it... */ | 142 | /* ARM is not shutting down, well, report the error and be done with it... */ |
143 | shutdown_ctx->cont (shutdown_ctx->cont_cls, shutdown_ctx->confirmed); | 143 | shutdown_ctx->cont (shutdown_ctx->cont_cls, shutdown_ctx->confirmed); |
144 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); | 144 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); |
145 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 145 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock); |
146 | GNUNET_free (shutdown_ctx); | 146 | GNUNET_free (shutdown_ctx); |
147 | return; | 147 | return; |
148 | } | 148 | } |
@@ -165,7 +165,7 @@ service_shutdown_cancel (void *cls, | |||
165 | struct ShutdownContext *shutdown_ctx = cls; | 165 | struct ShutdownContext *shutdown_ctx = cls; |
166 | 166 | ||
167 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_ARM_PROCESS_COMMUNICATION_TIMEOUT); | 167 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_ARM_PROCESS_COMMUNICATION_TIMEOUT); |
168 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 168 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock); |
169 | GNUNET_free (shutdown_ctx); | 169 | GNUNET_free (shutdown_ctx); |
170 | } | 170 | } |
171 | 171 | ||
@@ -191,7 +191,7 @@ write_shutdown (void *cls, size_t size, void *buf) | |||
191 | LOG (GNUNET_ERROR_TYPE_WARNING, | 191 | LOG (GNUNET_ERROR_TYPE_WARNING, |
192 | _("Failed to transmit shutdown request to client.\n")); | 192 | _("Failed to transmit shutdown request to client.\n")); |
193 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_ARM_PROCESS_COMMUNICATION_ERROR); | 193 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_ARM_PROCESS_COMMUNICATION_ERROR); |
194 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 194 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock); |
195 | GNUNET_free (shutdown_ctx); | 195 | GNUNET_free (shutdown_ctx); |
196 | return 0; /* client disconnected */ | 196 | return 0; /* client disconnected */ |
197 | } | 197 | } |
@@ -273,7 +273,7 @@ void | |||
273 | GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h) | 273 | GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h) |
274 | { | 274 | { |
275 | if (h->client != NULL) | 275 | if (h->client != NULL) |
276 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 276 | GNUNET_CLIENT_disconnect (h->client); |
277 | GNUNET_CONFIGURATION_destroy (h->cfg); | 277 | GNUNET_CONFIGURATION_destroy (h->cfg); |
278 | GNUNET_free (h); | 278 | GNUNET_free (h); |
279 | } | 279 | } |
@@ -471,7 +471,7 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
471 | ("Error receiving response to `%s' request from ARM for service `%s'\n"), | 471 | ("Error receiving response to `%s' request from ARM for service `%s'\n"), |
472 | (sc->type == GNUNET_MESSAGE_TYPE_ARM_START) ? "START" : "STOP", | 472 | (sc->type == GNUNET_MESSAGE_TYPE_ARM_START) ? "START" : "STOP", |
473 | (const char *) &sc[1]); | 473 | (const char *) &sc[1]); |
474 | GNUNET_CLIENT_disconnect (sc->h->client, GNUNET_NO); | 474 | GNUNET_CLIENT_disconnect (sc->h->client); |
475 | sc->h->client = GNUNET_CLIENT_connect ("arm", sc->h->cfg); | 475 | sc->h->client = GNUNET_CLIENT_connect ("arm", sc->h->cfg); |
476 | GNUNET_assert (NULL != sc->h->client); | 476 | GNUNET_assert (NULL != sc->h->client); |
477 | if (sc->callback != NULL) | 477 | if (sc->callback != NULL) |
@@ -730,7 +730,7 @@ handle_list_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
730 | { | 730 | { |
731 | LOG (GNUNET_ERROR_TYPE_WARNING, | 731 | LOG (GNUNET_ERROR_TYPE_WARNING, |
732 | "Error receiving response to LIST request from ARM\n"); | 732 | "Error receiving response to LIST request from ARM\n"); |
733 | GNUNET_CLIENT_disconnect (sc->h->client, GNUNET_NO); | 733 | GNUNET_CLIENT_disconnect (sc->h->client); |
734 | sc->h->client = GNUNET_CLIENT_connect ("arm", sc->h->cfg); | 734 | sc->h->client = GNUNET_CLIENT_connect ("arm", sc->h->cfg); |
735 | GNUNET_assert (NULL != sc->h->client); | 735 | GNUNET_assert (NULL != sc->h->client); |
736 | if (sc->callback != NULL) | 736 | if (sc->callback != NULL) |
diff --git a/src/arm/test_exponential_backoff.c b/src/arm/test_exponential_backoff.c index edd5cbf83..15756657f 100644 --- a/src/arm/test_exponential_backoff.c +++ b/src/arm/test_exponential_backoff.c | |||
@@ -121,7 +121,7 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
121 | if (shutdown_ctx->cont != NULL) | 121 | if (shutdown_ctx->cont != NULL) |
122 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR); | 122 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR); |
123 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); | 123 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); |
124 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 124 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock); |
125 | GNUNET_free (shutdown_ctx); | 125 | GNUNET_free (shutdown_ctx); |
126 | } | 126 | } |
127 | else if ((msg == NULL) && (shutdown_ctx->confirmed == GNUNET_YES)) | 127 | else if ((msg == NULL) && (shutdown_ctx->confirmed == GNUNET_YES)) |
@@ -133,7 +133,7 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
133 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_NO); | 133 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_NO); |
134 | 134 | ||
135 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); | 135 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); |
136 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 136 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock); |
137 | GNUNET_free (shutdown_ctx); | 137 | GNUNET_free (shutdown_ctx); |
138 | } | 138 | } |
139 | else | 139 | else |
@@ -159,7 +159,7 @@ service_shutdown_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
159 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_YES); | 159 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_YES); |
160 | 160 | ||
161 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); | 161 | GNUNET_SCHEDULER_cancel (shutdown_ctx->cancel_task); |
162 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 162 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock); |
163 | GNUNET_free (shutdown_ctx); | 163 | GNUNET_free (shutdown_ctx); |
164 | break; | 164 | break; |
165 | } | 165 | } |
@@ -180,7 +180,7 @@ service_shutdown_cancel (void *cls, | |||
180 | 180 | ||
181 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "service_shutdown_cancel called!\n"); | 181 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "service_shutdown_cancel called!\n"); |
182 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR); | 182 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR); |
183 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 183 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock); |
184 | GNUNET_free (shutdown_ctx); | 184 | GNUNET_free (shutdown_ctx); |
185 | } | 185 | } |
186 | 186 | ||
@@ -205,7 +205,7 @@ write_shutdown (void *cls, size_t size, void *buf) | |||
205 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 205 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
206 | _("Failed to transmit shutdown request to client.\n")); | 206 | _("Failed to transmit shutdown request to client.\n")); |
207 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR); | 207 | shutdown_ctx->cont (shutdown_ctx->cont_cls, GNUNET_SYSERR); |
208 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock, GNUNET_NO); | 208 | GNUNET_CLIENT_disconnect (shutdown_ctx->sock); |
209 | GNUNET_free (shutdown_ctx); | 209 | GNUNET_free (shutdown_ctx); |
210 | return 0; /* client disconnected */ | 210 | return 0; /* client disconnected */ |
211 | } | 211 | } |
@@ -358,7 +358,7 @@ kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
358 | GNUNET_assert (doNothingConnection != NULL); | 358 | GNUNET_assert (doNothingConnection != NULL); |
359 | if (trialCount == 12) | 359 | if (trialCount == 12) |
360 | { | 360 | { |
361 | GNUNET_CLIENT_disconnect (doNothingConnection, GNUNET_NO); | 361 | GNUNET_CLIENT_disconnect (doNothingConnection); |
362 | GNUNET_ARM_stop_service (arm, "do-nothing", TIMEOUT, &arm_notify_stop, | 362 | GNUNET_ARM_stop_service (arm, "do-nothing", TIMEOUT, &arm_notify_stop, |
363 | NULL); | 363 | NULL); |
364 | ok = 0; | 364 | ok = 0; |