diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-04-19 08:53:46 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-04-19 08:53:46 +0000 |
commit | ccc7218f3d2008d4e7ec5e222ba6b6451ec677ba (patch) | |
tree | 50664649cca13e5462dadea8c9bcde81c59e07ef | |
parent | 75297c57a857d0c7c1428bed00e32ed2c8b5389d (diff) | |
download | gnunet-ccc7218f3d2008d4e7ec5e222ba6b6451ec677ba.tar.gz gnunet-ccc7218f3d2008d4e7ec5e222ba6b6451ec677ba.zip |
-removing 2nd argument from GNUNET_CLIENT_disconnect as it was virtually always GNUNET_NO --- and all other uses indicate design problems
37 files changed, 95 insertions, 99 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; |
diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index 848c7ec4d..c98e1c243 100644 --- a/src/ats/ats_api_performance.c +++ b/src/ats/ats_api_performance.c | |||
@@ -395,7 +395,7 @@ process_ats_message (void *cls, const struct GNUNET_MessageHeader *msg) | |||
395 | GNUNET_TIME_UNIT_FOREVER_REL); | 395 | GNUNET_TIME_UNIT_FOREVER_REL); |
396 | return; | 396 | return; |
397 | reconnect: | 397 | reconnect: |
398 | GNUNET_CLIENT_disconnect (ph->client, GNUNET_NO); | 398 | GNUNET_CLIENT_disconnect (ph->client); |
399 | ph->client = NULL; | 399 | ph->client = NULL; |
400 | ph->task = | 400 | ph->task = |
401 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect_task, | 401 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect_task, |
@@ -493,7 +493,7 @@ GNUNET_ATS_performance_done (struct GNUNET_ATS_PerformanceHandle *ph) | |||
493 | } | 493 | } |
494 | if (NULL != ph->client) | 494 | if (NULL != ph->client) |
495 | { | 495 | { |
496 | GNUNET_CLIENT_disconnect (ph->client, GNUNET_NO); | 496 | GNUNET_CLIENT_disconnect (ph->client); |
497 | ph->client = NULL; | 497 | ph->client = NULL; |
498 | } | 498 | } |
499 | GNUNET_free (ph); | 499 | GNUNET_free (ph); |
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index ec14e0e13..ddb4f41c8 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include "gnunet_ats_service.h" | 27 | #include "gnunet_ats_service.h" |
28 | #include "ats.h" | 28 | #include "ats.h" |
29 | 29 | ||
30 | #define DEBUG_ATS GNUNET_EXTRA_LOGGING | ||
31 | 30 | ||
32 | #define INTERFACE_PROCESSING_INTERVALL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) | 31 | #define INTERFACE_PROCESSING_INTERVALL GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1) |
33 | 32 | ||
@@ -213,7 +212,7 @@ static void | |||
213 | force_reconnect (struct GNUNET_ATS_SchedulingHandle *sh) | 212 | force_reconnect (struct GNUNET_ATS_SchedulingHandle *sh) |
214 | { | 213 | { |
215 | sh->reconnect = GNUNET_NO; | 214 | sh->reconnect = GNUNET_NO; |
216 | GNUNET_CLIENT_disconnect (sh->client, GNUNET_NO); | 215 | GNUNET_CLIENT_disconnect (sh->client); |
217 | sh->client = NULL; | 216 | sh->client = NULL; |
218 | sh->task = | 217 | sh->task = |
219 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect_task, | 218 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &reconnect_task, |
@@ -918,7 +917,7 @@ GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh) | |||
918 | } | 917 | } |
919 | if (NULL != sh->client) | 918 | if (NULL != sh->client) |
920 | { | 919 | { |
921 | GNUNET_CLIENT_disconnect (sh->client, GNUNET_NO); | 920 | GNUNET_CLIENT_disconnect (sh->client); |
922 | sh->client = NULL; | 921 | sh->client = NULL; |
923 | } | 922 | } |
924 | if (GNUNET_SCHEDULER_NO_TASK != sh->task) | 923 | if (GNUNET_SCHEDULER_NO_TASK != sh->task) |
diff --git a/src/core/core_api.c b/src/core/core_api.c index 69dcfecf8..1a4b23333 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -448,7 +448,7 @@ reconnect_later (struct GNUNET_CORE_Handle *h) | |||
448 | } | 448 | } |
449 | if (h->client != NULL) | 449 | if (h->client != NULL) |
450 | { | 450 | { |
451 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 451 | GNUNET_CLIENT_disconnect (h->client); |
452 | h->client = NULL; | 452 | h->client = NULL; |
453 | } | 453 | } |
454 | h->currently_down = GNUNET_YES; | 454 | h->currently_down = GNUNET_YES; |
@@ -1243,7 +1243,7 @@ GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle) | |||
1243 | } | 1243 | } |
1244 | if (handle->client != NULL) | 1244 | if (handle->client != NULL) |
1245 | { | 1245 | { |
1246 | GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO); | 1246 | GNUNET_CLIENT_disconnect (handle->client); |
1247 | handle->client = NULL; | 1247 | handle->client = NULL; |
1248 | } | 1248 | } |
1249 | GNUNET_CONTAINER_multihashmap_iterate (handle->peers, | 1249 | GNUNET_CONTAINER_multihashmap_iterate (handle->peers, |
diff --git a/src/core/core_api_iterate_peers.c b/src/core/core_api_iterate_peers.c index 7b28842fd..0ecd98ed7 100644 --- a/src/core/core_api_iterate_peers.c +++ b/src/core/core_api_iterate_peers.c | |||
@@ -80,7 +80,7 @@ receive_info (void *cls, const struct GNUNET_MessageHeader *msg) | |||
80 | { | 80 | { |
81 | if (request_context->peer_cb != NULL) | 81 | if (request_context->peer_cb != NULL) |
82 | request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0); | 82 | request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0); |
83 | GNUNET_CLIENT_disconnect (request_context->client, GNUNET_NO); | 83 | GNUNET_CLIENT_disconnect (request_context->client); |
84 | GNUNET_free (request_context); | 84 | GNUNET_free (request_context); |
85 | return; | 85 | return; |
86 | } | 86 | } |
@@ -93,7 +93,7 @@ receive_info (void *cls, const struct GNUNET_MessageHeader *msg) | |||
93 | GNUNET_break (0); | 93 | GNUNET_break (0); |
94 | if (request_context->peer_cb != NULL) | 94 | if (request_context->peer_cb != NULL) |
95 | request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0); | 95 | request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0); |
96 | GNUNET_CLIENT_disconnect (request_context->client, GNUNET_NO); | 96 | GNUNET_CLIENT_disconnect (request_context->client); |
97 | GNUNET_free (request_context); | 97 | GNUNET_free (request_context); |
98 | return; | 98 | return; |
99 | } | 99 | } |
@@ -106,7 +106,7 @@ receive_info (void *cls, const struct GNUNET_MessageHeader *msg) | |||
106 | GNUNET_break (0); | 106 | GNUNET_break (0); |
107 | if (request_context->peer_cb != NULL) | 107 | if (request_context->peer_cb != NULL) |
108 | request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0); | 108 | request_context->peer_cb (request_context->cb_cls, NULL, NULL, 0); |
109 | GNUNET_CLIENT_disconnect (request_context->client, GNUNET_NO); | 109 | GNUNET_CLIENT_disconnect (request_context->client); |
110 | GNUNET_free (request_context); | 110 | GNUNET_free (request_context); |
111 | return; | 111 | return; |
112 | } | 112 | } |
diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c index 4f406a2bc..f4096c665 100644 --- a/src/datastore/datastore_api.c +++ b/src/datastore/datastore_api.c | |||
@@ -321,7 +321,7 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop) | |||
321 | } | 321 | } |
322 | if (h->client != NULL) | 322 | if (h->client != NULL) |
323 | { | 323 | { |
324 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 324 | GNUNET_CLIENT_disconnect (h->client); |
325 | h->client = NULL; | 325 | h->client = NULL; |
326 | } | 326 | } |
327 | if (h->reconnect_task != GNUNET_SCHEDULER_NO_TASK) | 327 | if (h->reconnect_task != GNUNET_SCHEDULER_NO_TASK) |
@@ -346,7 +346,7 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop) | |||
346 | GNUNET_TIME_UNIT_MINUTES, | 346 | GNUNET_TIME_UNIT_MINUTES, |
347 | GNUNET_YES, &transmit_drop, h)) | 347 | GNUNET_YES, &transmit_drop, h)) |
348 | return; | 348 | return; |
349 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 349 | GNUNET_CLIENT_disconnect (h->client); |
350 | h->client = NULL; | 350 | h->client = NULL; |
351 | } | 351 | } |
352 | GNUNET_break (0); | 352 | GNUNET_break (0); |
@@ -540,7 +540,7 @@ do_disconnect (struct GNUNET_DATASTORE_Handle *h) | |||
540 | GNUNET_STATISTICS_update (stats, gettext_noop ("# reconnected to DATASTORE"), | 540 | GNUNET_STATISTICS_update (stats, gettext_noop ("# reconnected to DATASTORE"), |
541 | 1, GNUNET_NO); | 541 | 1, GNUNET_NO); |
542 | #endif | 542 | #endif |
543 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 543 | GNUNET_CLIENT_disconnect (h->client); |
544 | h->skip_next_messages = 0; | 544 | h->skip_next_messages = 0; |
545 | h->client = NULL; | 545 | h->client = NULL; |
546 | h->reconnect_task = | 546 | h->reconnect_task = |
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c index 41096b2f2..1030b7999 100644 --- a/src/dht/dht_api.c +++ b/src/dht/dht_api.c | |||
@@ -368,7 +368,7 @@ do_disconnect (struct GNUNET_DHT_Handle *handle) | |||
368 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 368 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
369 | "Disconnecting from DHT service, will try to reconnect in %llu ms\n", | 369 | "Disconnecting from DHT service, will try to reconnect in %llu ms\n", |
370 | (unsigned long long) handle->retry_time.rel_value); | 370 | (unsigned long long) handle->retry_time.rel_value); |
371 | GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO); | 371 | GNUNET_CLIENT_disconnect (handle->client); |
372 | handle->client = NULL; | 372 | handle->client = NULL; |
373 | handle->reconnect_task = | 373 | handle->reconnect_task = |
374 | GNUNET_SCHEDULER_add_delayed (handle->retry_time, &try_reconnect, handle); | 374 | GNUNET_SCHEDULER_add_delayed (handle->retry_time, &try_reconnect, handle); |
@@ -701,7 +701,7 @@ GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle) | |||
701 | } | 701 | } |
702 | if (handle->client != NULL) | 702 | if (handle->client != NULL) |
703 | { | 703 | { |
704 | GNUNET_CLIENT_disconnect (handle->client, GNUNET_YES); | 704 | GNUNET_CLIENT_disconnect (handle->client); |
705 | handle->client = NULL; | 705 | handle->client = NULL; |
706 | } | 706 | } |
707 | if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK) | 707 | if (handle->reconnect_task != GNUNET_SCHEDULER_NO_TASK) |
@@ -735,7 +735,11 @@ timeout_put_request (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
735 | 735 | ||
736 | 736 | ||
737 | /** | 737 | /** |
738 | * Perform a PUT operation storing data in the DHT. | 738 | * Perform a PUT operation storing data in the DHT. FIXME: we should |
739 | * change the protocol to get a confirmation for the PUT from the DHT | ||
740 | * and call 'cont' only after getting the confirmation; otherwise, the | ||
741 | * client has no good way of telling if the 'PUT' message actually got | ||
742 | * to the DHT service! | ||
739 | * | 743 | * |
740 | * @param handle handle to DHT service | 744 | * @param handle handle to DHT service |
741 | * @param key the key to store under | 745 | * @param key the key to store under |
diff --git a/src/dns/dns_api.c b/src/dns/dns_api.c index a280265da..e0069936d 100644 --- a/src/dns/dns_api.c +++ b/src/dns/dns_api.c | |||
@@ -202,7 +202,7 @@ disconnect (struct GNUNET_DNS_Handle *dh) | |||
202 | } | 202 | } |
203 | if (NULL != dh->dns_connection) | 203 | if (NULL != dh->dns_connection) |
204 | { | 204 | { |
205 | GNUNET_CLIENT_disconnect (dh->dns_connection, GNUNET_NO); | 205 | GNUNET_CLIENT_disconnect (dh->dns_connection); |
206 | dh->dns_connection = NULL; | 206 | dh->dns_connection = NULL; |
207 | } | 207 | } |
208 | while (NULL != (qe = dh->rq_head)) | 208 | while (NULL != (qe = dh->rq_head)) |
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index 8ae4a29fb..e93db4cfd 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -1166,7 +1166,7 @@ signal_error: | |||
1166 | GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th); | 1166 | GNUNET_CLIENT_notify_transmit_ready_cancel (dc->th); |
1167 | dc->th = NULL; | 1167 | dc->th = NULL; |
1168 | } | 1168 | } |
1169 | GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO); | 1169 | GNUNET_CLIENT_disconnect (dc->client); |
1170 | dc->in_receive = GNUNET_NO; | 1170 | dc->in_receive = GNUNET_NO; |
1171 | dc->client = NULL; | 1171 | dc->client = NULL; |
1172 | GNUNET_FS_free_download_request_ (dc->top_request); | 1172 | GNUNET_FS_free_download_request_ (dc->top_request); |
@@ -1404,7 +1404,7 @@ try_reconnect (struct GNUNET_FS_DownloadContext *dc) | |||
1404 | dc->pending_head = NULL; | 1404 | dc->pending_head = NULL; |
1405 | dc->pending_tail = NULL; | 1405 | dc->pending_tail = NULL; |
1406 | GNUNET_CONTAINER_multihashmap_iterate (dc->active, &retry_entry, dc); | 1406 | GNUNET_CONTAINER_multihashmap_iterate (dc->active, &retry_entry, dc); |
1407 | GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO); | 1407 | GNUNET_CLIENT_disconnect (dc->client); |
1408 | dc->in_receive = GNUNET_NO; | 1408 | dc->in_receive = GNUNET_NO; |
1409 | dc->client = NULL; | 1409 | dc->client = NULL; |
1410 | } | 1410 | } |
@@ -1471,7 +1471,7 @@ deactivate_fs_download (void *cls) | |||
1471 | } | 1471 | } |
1472 | if (NULL != dc->client) | 1472 | if (NULL != dc->client) |
1473 | { | 1473 | { |
1474 | GNUNET_CLIENT_disconnect (dc->client, GNUNET_NO); | 1474 | GNUNET_CLIENT_disconnect (dc->client); |
1475 | dc->in_receive = GNUNET_NO; | 1475 | dc->in_receive = GNUNET_NO; |
1476 | dc->client = NULL; | 1476 | dc->client = NULL; |
1477 | } | 1477 | } |
diff --git a/src/fs/fs_list_indexed.c b/src/fs/fs_list_indexed.c index 784c9881a..ef03dee76 100644 --- a/src/fs/fs_list_indexed.c +++ b/src/fs/fs_list_indexed.c | |||
@@ -176,7 +176,7 @@ GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h, | |||
176 | void | 176 | void |
177 | GNUNET_FS_get_indexed_files_cancel (struct GNUNET_FS_GetIndexedContext *gic) | 177 | GNUNET_FS_get_indexed_files_cancel (struct GNUNET_FS_GetIndexedContext *gic) |
178 | { | 178 | { |
179 | GNUNET_CLIENT_disconnect (gic->client, GNUNET_NO); | 179 | GNUNET_CLIENT_disconnect (gic->client); |
180 | GNUNET_free (gic); | 180 | GNUNET_free (gic); |
181 | } | 181 | } |
182 | 182 | ||
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index e0a6f046a..3d83beef8 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c | |||
@@ -98,7 +98,7 @@ publish_cleanup (struct GNUNET_FS_PublishContext *pc) | |||
98 | } | 98 | } |
99 | if (pc->client != NULL) | 99 | if (pc->client != NULL) |
100 | { | 100 | { |
101 | GNUNET_CLIENT_disconnect (pc->client, GNUNET_NO); | 101 | GNUNET_CLIENT_disconnect (pc->client); |
102 | pc->client = NULL; | 102 | pc->client = NULL; |
103 | } | 103 | } |
104 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); | 104 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == pc->upload_task); |
@@ -611,7 +611,7 @@ process_index_start_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
611 | const char *emsg; | 611 | const char *emsg; |
612 | uint16_t msize; | 612 | uint16_t msize; |
613 | 613 | ||
614 | GNUNET_CLIENT_disconnect (pc->client, GNUNET_NO); | 614 | GNUNET_CLIENT_disconnect (pc->client); |
615 | pc->client = NULL; | 615 | pc->client = NULL; |
616 | p = pc->fi_pos; | 616 | p = pc->fi_pos; |
617 | if (msg == NULL) | 617 | if (msg == NULL) |
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 94a77e136..ef3e66fbc 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include "gnunet_protocols.h" | 30 | #include "gnunet_protocols.h" |
31 | #include "fs_api.h" | 31 | #include "fs_api.h" |
32 | 32 | ||
33 | #define DEBUG_SEARCH GNUNET_EXTRA_LOGGING | ||
34 | 33 | ||
35 | /** | 34 | /** |
36 | * Number of availability trials we perform per search result. | 35 | * Number of availability trials we perform per search result. |
@@ -1152,7 +1151,7 @@ try_reconnect (struct GNUNET_FS_SearchContext *sc) | |||
1152 | { | 1151 | { |
1153 | if (NULL != sc->client) | 1152 | if (NULL != sc->client) |
1154 | { | 1153 | { |
1155 | GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO); | 1154 | GNUNET_CLIENT_disconnect (sc->client); |
1156 | sc->client = NULL; | 1155 | sc->client = NULL; |
1157 | } | 1156 | } |
1158 | sc->task = | 1157 | sc->task = |
@@ -1369,7 +1368,7 @@ GNUNET_FS_search_signal_suspend_ (void *cls) | |||
1369 | if (sc->task != GNUNET_SCHEDULER_NO_TASK) | 1368 | if (sc->task != GNUNET_SCHEDULER_NO_TASK) |
1370 | GNUNET_SCHEDULER_cancel (sc->task); | 1369 | GNUNET_SCHEDULER_cancel (sc->task); |
1371 | if (NULL != sc->client) | 1370 | if (NULL != sc->client) |
1372 | GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO); | 1371 | GNUNET_CLIENT_disconnect (sc->client); |
1373 | GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map); | 1372 | GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map); |
1374 | if (sc->requests != NULL) | 1373 | if (sc->requests != NULL) |
1375 | { | 1374 | { |
@@ -1425,7 +1424,7 @@ GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc) | |||
1425 | GNUNET_SCHEDULER_cancel (sc->task); | 1424 | GNUNET_SCHEDULER_cancel (sc->task); |
1426 | sc->task = GNUNET_SCHEDULER_NO_TASK; | 1425 | sc->task = GNUNET_SCHEDULER_NO_TASK; |
1427 | if (NULL != sc->client) | 1426 | if (NULL != sc->client) |
1428 | GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO); | 1427 | GNUNET_CLIENT_disconnect (sc->client); |
1429 | sc->client = NULL; | 1428 | sc->client = NULL; |
1430 | GNUNET_FS_search_sync_ (sc); | 1429 | GNUNET_FS_search_sync_ (sc); |
1431 | GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map, | 1430 | GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map, |
@@ -1569,7 +1568,7 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc) | |||
1569 | if (sc->task != GNUNET_SCHEDULER_NO_TASK) | 1568 | if (sc->task != GNUNET_SCHEDULER_NO_TASK) |
1570 | GNUNET_SCHEDULER_cancel (sc->task); | 1569 | GNUNET_SCHEDULER_cancel (sc->task); |
1571 | if (NULL != sc->client) | 1570 | if (NULL != sc->client) |
1572 | GNUNET_CLIENT_disconnect (sc->client, GNUNET_NO); | 1571 | GNUNET_CLIENT_disconnect (sc->client); |
1573 | GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map, | 1572 | GNUNET_CONTAINER_multihashmap_iterate (sc->master_result_map, |
1574 | &search_result_free, sc); | 1573 | &search_result_free, sc); |
1575 | GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map); | 1574 | GNUNET_CONTAINER_multihashmap_destroy (sc->master_result_map); |
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c index bf619b75a..fa71b56bc 100644 --- a/src/fs/fs_unindex.c +++ b/src/fs/fs_unindex.c | |||
@@ -223,7 +223,7 @@ process_fs_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
223 | 223 | ||
224 | if (uc->client != NULL) | 224 | if (uc->client != NULL) |
225 | { | 225 | { |
226 | GNUNET_CLIENT_disconnect (uc->client, GNUNET_NO); | 226 | GNUNET_CLIENT_disconnect (uc->client); |
227 | uc->client = NULL; | 227 | uc->client = NULL; |
228 | } | 228 | } |
229 | if (uc->state != UNINDEX_STATE_FS_NOTIFY) | 229 | if (uc->state != UNINDEX_STATE_FS_NOTIFY) |
@@ -708,7 +708,7 @@ GNUNET_FS_unindex_signal_suspend_ (void *cls) | |||
708 | } | 708 | } |
709 | if (uc->client != NULL) | 709 | if (uc->client != NULL) |
710 | { | 710 | { |
711 | GNUNET_CLIENT_disconnect (uc->client, GNUNET_NO); | 711 | GNUNET_CLIENT_disconnect (uc->client); |
712 | uc->client = NULL; | 712 | uc->client = NULL; |
713 | } | 713 | } |
714 | if (NULL != uc->dsh) | 714 | if (NULL != uc->dsh) |
@@ -803,7 +803,7 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc) | |||
803 | } | 803 | } |
804 | if (uc->client != NULL) | 804 | if (uc->client != NULL) |
805 | { | 805 | { |
806 | GNUNET_CLIENT_disconnect (uc->client, GNUNET_NO); | 806 | GNUNET_CLIENT_disconnect (uc->client); |
807 | uc->client = NULL; | 807 | uc->client = NULL; |
808 | } | 808 | } |
809 | if (NULL != uc->dsh) | 809 | if (NULL != uc->dsh) |
diff --git a/src/gns/gns_api.c b/src/gns/gns_api.c index 4b7d6b9f8..1a06f34e0 100644 --- a/src/gns/gns_api.c +++ b/src/gns/gns_api.c | |||
@@ -229,7 +229,7 @@ static void | |||
229 | force_reconnect (struct GNUNET_GNS_Handle *h) | 229 | force_reconnect (struct GNUNET_GNS_Handle *h) |
230 | { | 230 | { |
231 | h->reconnect = GNUNET_NO; | 231 | h->reconnect = GNUNET_NO; |
232 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 232 | GNUNET_CLIENT_disconnect (h->client); |
233 | h->client = NULL; | 233 | h->client = NULL; |
234 | h->reconnect_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | 234 | h->reconnect_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
235 | &reconnect_task, | 235 | &reconnect_task, |
@@ -610,7 +610,7 @@ GNUNET_GNS_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
610 | void | 610 | void |
611 | GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle) | 611 | GNUNET_GNS_disconnect (struct GNUNET_GNS_Handle *handle) |
612 | { | 612 | { |
613 | GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO); | 613 | GNUNET_CLIENT_disconnect (handle->client); |
614 | if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task) | 614 | if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task) |
615 | { | 615 | { |
616 | GNUNET_SCHEDULER_cancel (handle->reconnect_task); | 616 | GNUNET_SCHEDULER_cancel (handle->reconnect_task); |
diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h index 60fa938c8..100de326f 100644 --- a/src/include/gnunet_client_lib.h +++ b/src/include/gnunet_client_lib.h | |||
@@ -70,12 +70,9 @@ GNUNET_CLIENT_connect (const char *service_name, | |||
70 | * which case the message may still be lost). | 70 | * which case the message may still be lost). |
71 | * | 71 | * |
72 | * @param sock handle to the service connection | 72 | * @param sock handle to the service connection |
73 | * @param finish_pending_write should a transmission already passed to the | ||
74 | * handle be completed? | ||
75 | */ | 73 | */ |
76 | void | 74 | void |
77 | GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock, | 75 | GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock); |
78 | int finish_pending_write); | ||
79 | 76 | ||
80 | 77 | ||
81 | /** | 78 | /** |
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index c8d2162bc..4b6d6c4f9 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c | |||
@@ -675,7 +675,7 @@ do_reconnect (struct GNUNET_MESH_Handle *h) | |||
675 | } | 675 | } |
676 | if (NULL != h->client) | 676 | if (NULL != h->client) |
677 | { | 677 | { |
678 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 678 | GNUNET_CLIENT_disconnect (h->client); |
679 | } | 679 | } |
680 | 680 | ||
681 | /* connect again */ | 681 | /* connect again */ |
@@ -1375,7 +1375,7 @@ GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle) | |||
1375 | } | 1375 | } |
1376 | if (NULL != handle->client) | 1376 | if (NULL != handle->client) |
1377 | { | 1377 | { |
1378 | GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO); | 1378 | GNUNET_CLIENT_disconnect (handle->client); |
1379 | handle->client = NULL; | 1379 | handle->client = NULL; |
1380 | } | 1380 | } |
1381 | if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task) | 1381 | if (GNUNET_SCHEDULER_NO_TASK != handle->reconnect_task) |
diff --git a/src/namestore/namestore_api.c b/src/namestore/namestore_api.c index bdb53e27f..b965ebefb 100644 --- a/src/namestore/namestore_api.c +++ b/src/namestore/namestore_api.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include "gnunet_namestore_service.h" | 35 | #include "gnunet_namestore_service.h" |
36 | #include "namestore.h" | 36 | #include "namestore.h" |
37 | 37 | ||
38 | #define DEBUG_GNS_API GNUNET_EXTRA_LOGGING | ||
39 | 38 | ||
40 | #define LOG(kind,...) GNUNET_log_from (kind, "gns-api",__VA_ARGS__) | 39 | #define LOG(kind,...) GNUNET_log_from (kind, "gns-api",__VA_ARGS__) |
41 | 40 | ||
@@ -864,7 +863,7 @@ static void | |||
864 | force_reconnect (struct GNUNET_NAMESTORE_Handle *h) | 863 | force_reconnect (struct GNUNET_NAMESTORE_Handle *h) |
865 | { | 864 | { |
866 | h->reconnect = GNUNET_NO; | 865 | h->reconnect = GNUNET_NO; |
867 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 866 | GNUNET_CLIENT_disconnect (h->client); |
868 | h->client = NULL; | 867 | h->client = NULL; |
869 | h->reconnect_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | 868 | h->reconnect_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, |
870 | &reconnect_task, | 869 | &reconnect_task, |
@@ -926,7 +925,7 @@ clean_up_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
926 | 925 | ||
927 | if (NULL != h->client) | 926 | if (NULL != h->client) |
928 | { | 927 | { |
929 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 928 | GNUNET_CLIENT_disconnect (h->client); |
930 | h->client = NULL; | 929 | h->client = NULL; |
931 | } | 930 | } |
932 | if (GNUNET_SCHEDULER_NO_TASK != h->reconnect_task) | 931 | if (GNUNET_SCHEDULER_NO_TASK != h->reconnect_task) |
diff --git a/src/nat/nat_test.c b/src/nat/nat_test.c index 92f72e4be..98ce82e73 100644 --- a/src/nat/nat_test.c +++ b/src/nat/nat_test.c | |||
@@ -460,7 +460,7 @@ GNUNET_NAT_test_stop (struct GNUNET_NAT_Test *tst) | |||
460 | while (NULL != (cpos = tst->ca_head)) | 460 | while (NULL != (cpos = tst->ca_head)) |
461 | { | 461 | { |
462 | GNUNET_CONTAINER_DLL_remove (tst->ca_head, tst->ca_tail, cpos); | 462 | GNUNET_CONTAINER_DLL_remove (tst->ca_head, tst->ca_tail, cpos); |
463 | GNUNET_CLIENT_disconnect (cpos->client, GNUNET_NO); | 463 | GNUNET_CLIENT_disconnect (cpos->client); |
464 | GNUNET_free (cpos); | 464 | GNUNET_free (cpos); |
465 | } | 465 | } |
466 | while (NULL != (pos = tst->na_head)) | 466 | while (NULL != (pos = tst->na_head)) |
diff --git a/src/nse/nse_api.c b/src/nse/nse_api.c index 4d5f6bb71..2fa8af2e5 100644 --- a/src/nse/nse_api.c +++ b/src/nse/nse_api.c | |||
@@ -106,7 +106,7 @@ message_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
106 | if (msg == NULL) | 106 | if (msg == NULL) |
107 | { | 107 | { |
108 | /* Error, timeout, death */ | 108 | /* Error, timeout, death */ |
109 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 109 | GNUNET_CLIENT_disconnect (h->client); |
110 | h->client = NULL; | 110 | h->client = NULL; |
111 | h->reconnect_task = | 111 | h->reconnect_task = |
112 | GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h); | 112 | GNUNET_SCHEDULER_add_delayed (h->reconnect_delay, &reconnect, h); |
@@ -145,7 +145,7 @@ reschedule_connect (struct GNUNET_NSE_Handle *h) | |||
145 | } | 145 | } |
146 | if (NULL != h->client) | 146 | if (NULL != h->client) |
147 | { | 147 | { |
148 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 148 | GNUNET_CLIENT_disconnect (h->client); |
149 | h->client = NULL; | 149 | h->client = NULL; |
150 | } | 150 | } |
151 | 151 | ||
@@ -289,7 +289,7 @@ GNUNET_NSE_disconnect (struct GNUNET_NSE_Handle *h) | |||
289 | } | 289 | } |
290 | if (h->client != NULL) | 290 | if (h->client != NULL) |
291 | { | 291 | { |
292 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 292 | GNUNET_CLIENT_disconnect (h->client); |
293 | h->client = NULL; | 293 | h->client = NULL; |
294 | } | 294 | } |
295 | GNUNET_free (h); | 295 | GNUNET_free (h); |
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c index 593ee8b3c..5eb58af44 100644 --- a/src/peerinfo/peerinfo_api.c +++ b/src/peerinfo/peerinfo_api.c | |||
@@ -172,7 +172,7 @@ GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h) | |||
172 | } | 172 | } |
173 | if (NULL != h->client) | 173 | if (NULL != h->client) |
174 | { | 174 | { |
175 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 175 | GNUNET_CLIENT_disconnect (h->client); |
176 | h->client = NULL; | 176 | h->client = NULL; |
177 | } | 177 | } |
178 | if (GNUNET_SCHEDULER_NO_TASK != h->r_task) | 178 | if (GNUNET_SCHEDULER_NO_TASK != h->r_task) |
@@ -238,7 +238,7 @@ reconnect (struct GNUNET_PEERINFO_Handle *h) | |||
238 | } | 238 | } |
239 | if (NULL != h->client) | 239 | if (NULL != h->client) |
240 | { | 240 | { |
241 | GNUNET_CLIENT_disconnect (h->client, GNUNET_SYSERR); | 241 | GNUNET_CLIENT_disconnect (h->client); |
242 | h->client = NULL; | 242 | h->client = NULL; |
243 | } | 243 | } |
244 | h->client = GNUNET_CLIENT_connect ("peerinfo", h->cfg); | 244 | h->client = GNUNET_CLIENT_connect ("peerinfo", h->cfg); |
diff --git a/src/peerinfo/peerinfo_api_notify.c b/src/peerinfo/peerinfo_api_notify.c index 2557cdfde..b9e83c9e7 100644 --- a/src/peerinfo/peerinfo_api_notify.c +++ b/src/peerinfo/peerinfo_api_notify.c | |||
@@ -133,7 +133,7 @@ process_notification (void *cls, const struct GNUNET_MessageHeader *msg) | |||
133 | 133 | ||
134 | if (msg == NULL) | 134 | if (msg == NULL) |
135 | { | 135 | { |
136 | GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO); | 136 | GNUNET_CLIENT_disconnect (nc->client); |
137 | reconnect (nc, NULL); | 137 | reconnect (nc, NULL); |
138 | return; | 138 | return; |
139 | } | 139 | } |
@@ -142,7 +142,7 @@ process_notification (void *cls, const struct GNUNET_MessageHeader *msg) | |||
142 | (ntohs (msg->type) != GNUNET_MESSAGE_TYPE_PEERINFO_INFO)) | 142 | (ntohs (msg->type) != GNUNET_MESSAGE_TYPE_PEERINFO_INFO)) |
143 | { | 143 | { |
144 | GNUNET_break (0); | 144 | GNUNET_break (0); |
145 | GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO); | 145 | GNUNET_CLIENT_disconnect (nc->client); |
146 | nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg); | 146 | nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg); |
147 | request_notifications (nc); | 147 | request_notifications (nc); |
148 | return; | 148 | return; |
@@ -155,7 +155,7 @@ process_notification (void *cls, const struct GNUNET_MessageHeader *msg) | |||
155 | if (ms != sizeof (struct InfoMessage) + GNUNET_HELLO_size (hello)) | 155 | if (ms != sizeof (struct InfoMessage) + GNUNET_HELLO_size (hello)) |
156 | { | 156 | { |
157 | GNUNET_break (0); | 157 | GNUNET_break (0); |
158 | GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO); | 158 | GNUNET_CLIENT_disconnect (nc->client); |
159 | nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg); | 159 | nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg); |
160 | request_notifications (nc); | 160 | request_notifications (nc); |
161 | return; | 161 | return; |
@@ -200,7 +200,7 @@ transmit_notify_request (void *cls, size_t size, void *buf) | |||
200 | nc->init = NULL; | 200 | nc->init = NULL; |
201 | if (buf == NULL) | 201 | if (buf == NULL) |
202 | { | 202 | { |
203 | GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO); | 203 | GNUNET_CLIENT_disconnect (nc->client); |
204 | nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg); | 204 | nc->client = GNUNET_CLIENT_connect ("peerinfo", nc->cfg); |
205 | request_notifications (nc); | 205 | request_notifications (nc); |
206 | return 0; | 206 | return 0; |
@@ -281,7 +281,7 @@ GNUNET_PEERINFO_notify_cancel (struct GNUNET_PEERINFO_NotifyContext *nc) | |||
281 | nc->init = NULL; | 281 | nc->init = NULL; |
282 | } | 282 | } |
283 | if (NULL != nc->client) | 283 | if (NULL != nc->client) |
284 | GNUNET_CLIENT_disconnect (nc->client, GNUNET_NO); | 284 | GNUNET_CLIENT_disconnect (nc->client); |
285 | if (GNUNET_SCHEDULER_NO_TASK != nc->task) | 285 | if (GNUNET_SCHEDULER_NO_TASK != nc->task) |
286 | GNUNET_SCHEDULER_cancel (nc->task); | 286 | GNUNET_SCHEDULER_cancel (nc->task); |
287 | GNUNET_free (nc); | 287 | GNUNET_free (nc); |
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index 253e59737..f1a22c22a 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c | |||
@@ -337,7 +337,7 @@ do_disconnect (struct GNUNET_STATISTICS_Handle *h) | |||
337 | } | 337 | } |
338 | if (NULL != h->client) | 338 | if (NULL != h->client) |
339 | { | 339 | { |
340 | GNUNET_CLIENT_disconnect (h->client, GNUNET_NO); | 340 | GNUNET_CLIENT_disconnect (h->client); |
341 | h->client = NULL; | 341 | h->client = NULL; |
342 | } | 342 | } |
343 | h->receiving = GNUNET_NO; | 343 | h->receiving = GNUNET_NO; |
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index 9ff5cec88..e7f2327d9 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -940,7 +940,7 @@ disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_Handle *h) | |||
940 | } | 940 | } |
941 | if (NULL != h->client) | 941 | if (NULL != h->client) |
942 | { | 942 | { |
943 | GNUNET_CLIENT_disconnect (h->client, GNUNET_YES); | 943 | GNUNET_CLIENT_disconnect (h->client); |
944 | h->client = NULL; | 944 | h->client = NULL; |
945 | } | 945 | } |
946 | /* Forget about all neighbours that we used to be connected to */ | 946 | /* Forget about all neighbours that we used to be connected to */ |
diff --git a/src/transport/transport_api_address_lookup.c b/src/transport/transport_api_address_lookup.c index 797b95f07..655be833f 100644 --- a/src/transport/transport_api_address_lookup.c +++ b/src/transport/transport_api_address_lookup.c | |||
@@ -155,7 +155,7 @@ static void | |||
155 | reconnect (struct GNUNET_TRANSPORT_PeerIterateContext *pal_ctx) | 155 | reconnect (struct GNUNET_TRANSPORT_PeerIterateContext *pal_ctx) |
156 | { | 156 | { |
157 | GNUNET_assert (GNUNET_NO == pal_ctx->one_shot); | 157 | GNUNET_assert (GNUNET_NO == pal_ctx->one_shot); |
158 | GNUNET_CLIENT_disconnect (pal_ctx->client, GNUNET_NO); | 158 | GNUNET_CLIENT_disconnect (pal_ctx->client); |
159 | pal_ctx->client = NULL; | 159 | pal_ctx->client = NULL; |
160 | pal_ctx->backoff = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS, | 160 | pal_ctx->backoff = GNUNET_TIME_relative_max (GNUNET_TIME_UNIT_MILLISECONDS, |
161 | GNUNET_TIME_relative_min (GNUNET_TIME_relative_multiply (pal_ctx->backoff, 2), | 161 | GNUNET_TIME_relative_min (GNUNET_TIME_relative_multiply (pal_ctx->backoff, 2), |
@@ -354,7 +354,7 @@ GNUNET_TRANSPORT_peer_get_active_addresses_cancel (struct | |||
354 | { | 354 | { |
355 | if (NULL != alc->client) | 355 | if (NULL != alc->client) |
356 | { | 356 | { |
357 | GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO); | 357 | GNUNET_CLIENT_disconnect (alc->client); |
358 | alc->client = NULL; | 358 | alc->client = NULL; |
359 | } | 359 | } |
360 | if (GNUNET_SCHEDULER_NO_TASK != alc->reconnect_task) | 360 | if (GNUNET_SCHEDULER_NO_TASK != alc->reconnect_task) |
diff --git a/src/transport/transport_api_address_to_string.c b/src/transport/transport_api_address_to_string.c index 73ea09f85..237c0b657 100644 --- a/src/transport/transport_api_address_to_string.c +++ b/src/transport/transport_api_address_to_string.c | |||
@@ -71,7 +71,7 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg) | |||
71 | if (msg == NULL) | 71 | if (msg == NULL) |
72 | { | 72 | { |
73 | alucb->cb (alucb->cb_cls, NULL); | 73 | alucb->cb (alucb->cb_cls, NULL); |
74 | GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO); | 74 | GNUNET_CLIENT_disconnect (alucb->client); |
75 | GNUNET_free (alucb); | 75 | GNUNET_free (alucb); |
76 | return; | 76 | return; |
77 | } | 77 | } |
@@ -82,7 +82,7 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg) | |||
82 | { | 82 | { |
83 | /* done! */ | 83 | /* done! */ |
84 | alucb->cb (alucb->cb_cls, NULL); | 84 | alucb->cb (alucb->cb_cls, NULL); |
85 | GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO); | 85 | GNUNET_CLIENT_disconnect (alucb->client); |
86 | GNUNET_free (alucb); | 86 | GNUNET_free (alucb); |
87 | return; | 87 | return; |
88 | } | 88 | } |
@@ -92,7 +92,7 @@ address_response_processor (void *cls, const struct GNUNET_MessageHeader *msg) | |||
92 | /* invalid reply */ | 92 | /* invalid reply */ |
93 | GNUNET_break (0); | 93 | GNUNET_break (0); |
94 | alucb->cb (alucb->cb_cls, NULL); | 94 | alucb->cb (alucb->cb_cls, NULL); |
95 | GNUNET_CLIENT_disconnect (alucb->client, GNUNET_NO); | 95 | GNUNET_CLIENT_disconnect (alucb->client); |
96 | GNUNET_free (alucb); | 96 | GNUNET_free (alucb); |
97 | return; | 97 | return; |
98 | } | 98 | } |
@@ -180,7 +180,7 @@ GNUNET_TRANSPORT_address_to_string_cancel (struct | |||
180 | GNUNET_TRANSPORT_AddressToStringContext | 180 | GNUNET_TRANSPORT_AddressToStringContext |
181 | *alc) | 181 | *alc) |
182 | { | 182 | { |
183 | GNUNET_CLIENT_disconnect (alc->client, GNUNET_NO); | 183 | GNUNET_CLIENT_disconnect (alc->client); |
184 | GNUNET_free (alc); | 184 | GNUNET_free (alc); |
185 | } | 185 | } |
186 | 186 | ||
diff --git a/src/transport/transport_api_blacklist.c b/src/transport/transport_api_blacklist.c index be52623bb..04646204f 100644 --- a/src/transport/transport_api_blacklist.c +++ b/src/transport/transport_api_blacklist.c | |||
@@ -168,7 +168,7 @@ static void | |||
168 | reconnect (struct GNUNET_TRANSPORT_Blacklist *br) | 168 | reconnect (struct GNUNET_TRANSPORT_Blacklist *br) |
169 | { | 169 | { |
170 | if (br->client != NULL) | 170 | if (br->client != NULL) |
171 | GNUNET_CLIENT_disconnect (br->client, GNUNET_NO); | 171 | GNUNET_CLIENT_disconnect (br->client); |
172 | br->client = GNUNET_CLIENT_connect ("transport", br->cfg); | 172 | br->client = GNUNET_CLIENT_connect ("transport", br->cfg); |
173 | GNUNET_assert (br->client != NULL); | 173 | GNUNET_assert (br->client != NULL); |
174 | br->th = | 174 | br->th = |
@@ -288,7 +288,7 @@ GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br) | |||
288 | GNUNET_CLIENT_notify_transmit_ready_cancel (br->th); | 288 | GNUNET_CLIENT_notify_transmit_ready_cancel (br->th); |
289 | br->th = NULL; | 289 | br->th = NULL; |
290 | } | 290 | } |
291 | GNUNET_CLIENT_disconnect (br->client, GNUNET_NO); | 291 | GNUNET_CLIENT_disconnect (br->client); |
292 | GNUNET_free (br); | 292 | GNUNET_free (br); |
293 | } | 293 | } |
294 | 294 | ||
diff --git a/src/util/client.c b/src/util/client.c index f8690dfbc..72c83e29b 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -389,13 +389,10 @@ GNUNET_CLIENT_connect (const char *service_name, | |||
389 | * destroyed (unless, of course, there is an error with the server in | 389 | * destroyed (unless, of course, there is an error with the server in |
390 | * which case the message may still be lost). | 390 | * which case the message may still be lost). |
391 | * | 391 | * |
392 | * @param finish_pending_write should a transmission already passed to the | ||
393 | * handle be completed? | ||
394 | * @param sock handle to the service connection | 392 | * @param sock handle to the service connection |
395 | */ | 393 | */ |
396 | void | 394 | void |
397 | GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock, | 395 | GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock) |
398 | int finish_pending_write) | ||
399 | { | 396 | { |
400 | if (sock->in_receive == GNUNET_YES) | 397 | if (sock->in_receive == GNUNET_YES) |
401 | { | 398 | { |
@@ -409,7 +406,7 @@ GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock, | |||
409 | } | 406 | } |
410 | if (NULL != sock->sock) | 407 | if (NULL != sock->sock) |
411 | { | 408 | { |
412 | GNUNET_CONNECTION_destroy (sock->sock, finish_pending_write); | 409 | GNUNET_CONNECTION_destroy (sock->sock, GNUNET_NO); |
413 | sock->sock = NULL; | 410 | sock->sock = NULL; |
414 | } | 411 | } |
415 | if (sock->receive_task != GNUNET_SCHEDULER_NO_TASK) | 412 | if (sock->receive_task != GNUNET_SCHEDULER_NO_TASK) |
@@ -619,7 +616,7 @@ confirm_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
619 | { | 616 | { |
620 | service_test_error (conn->test_cb, conn->test_cb_cls); | 617 | service_test_error (conn->test_cb, conn->test_cb_cls); |
621 | } | 618 | } |
622 | GNUNET_CLIENT_disconnect (conn, GNUNET_NO); | 619 | GNUNET_CLIENT_disconnect (conn); |
623 | } | 620 | } |
624 | 621 | ||
625 | 622 | ||
@@ -642,7 +639,7 @@ write_test (void *cls, size_t size, void *buf) | |||
642 | { | 639 | { |
643 | LOG (GNUNET_ERROR_TYPE_DEBUG, _("Failure to transmit TEST request.\n")); | 640 | LOG (GNUNET_ERROR_TYPE_DEBUG, _("Failure to transmit TEST request.\n")); |
644 | service_test_error (conn->test_cb, conn->test_cb_cls); | 641 | service_test_error (conn->test_cb, conn->test_cb_cls); |
645 | GNUNET_CLIENT_disconnect (conn, GNUNET_NO); | 642 | GNUNET_CLIENT_disconnect (conn); |
646 | return 0; /* client disconnected */ | 643 | return 0; /* client disconnected */ |
647 | } | 644 | } |
648 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Transmitting `%s' request.\n", "TEST"); | 645 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Transmitting `%s' request.\n", "TEST"); |
@@ -855,7 +852,7 @@ GNUNET_CLIENT_service_test (const char *service, | |||
855 | LOG (GNUNET_ERROR_TYPE_WARNING, | 852 | LOG (GNUNET_ERROR_TYPE_WARNING, |
856 | _("Failure to transmit request to service `%s'\n"), service); | 853 | _("Failure to transmit request to service `%s'\n"), service); |
857 | service_test_error (task, task_cls); | 854 | service_test_error (task, task_cls); |
858 | GNUNET_CLIENT_disconnect (conn, GNUNET_NO); | 855 | GNUNET_CLIENT_disconnect (conn); |
859 | return; | 856 | return; |
860 | } | 857 | } |
861 | } | 858 | } |
diff --git a/src/util/connection.c b/src/util/connection.c index da7ba599d..6908144b7 100644 --- a/src/util/connection.c +++ b/src/util/connection.c | |||
@@ -323,6 +323,7 @@ GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock) | |||
323 | return GNUNET_NETWORK_socket_disable_corking (sock->sock); | 323 | return GNUNET_NETWORK_socket_disable_corking (sock->sock); |
324 | } | 324 | } |
325 | 325 | ||
326 | |||
326 | /** | 327 | /** |
327 | * Create a socket handle by boxing an existing OS socket. The OS | 328 | * Create a socket handle by boxing an existing OS socket. The OS |
328 | * socket should henceforth be no longer used directly. | 329 | * socket should henceforth be no longer used directly. |
@@ -477,6 +478,7 @@ GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access, | |||
477 | return ret; | 478 | return ret; |
478 | } | 479 | } |
479 | 480 | ||
481 | |||
480 | /** | 482 | /** |
481 | * Obtain the network address of the other party. | 483 | * Obtain the network address of the other party. |
482 | * | 484 | * |
@@ -1041,7 +1043,6 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock, | |||
1041 | GNUNET_RESOLVER_request_cancel (sock->dns_active); | 1043 | GNUNET_RESOLVER_request_cancel (sock->dns_active); |
1042 | sock->dns_active = NULL; | 1044 | sock->dns_active = NULL; |
1043 | } | 1045 | } |
1044 | |||
1045 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == sock->destroy_task); | 1046 | GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == sock->destroy_task); |
1046 | sock->destroy_task = GNUNET_SCHEDULER_add_now (&destroy_continuation, sock); | 1047 | sock->destroy_task = GNUNET_SCHEDULER_add_now (&destroy_continuation, sock); |
1047 | } | 1048 | } |
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index 9d5ae6c0a..0c12afad4 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c | |||
@@ -253,7 +253,7 @@ GNUNET_RESOLVER_disconnect () | |||
253 | #if DEBUG_RESOLVER | 253 | #if DEBUG_RESOLVER |
254 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from DNS service\n"); | 254 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Disconnecting from DNS service\n"); |
255 | #endif | 255 | #endif |
256 | GNUNET_CLIENT_disconnect (client, GNUNET_NO); | 256 | GNUNET_CLIENT_disconnect (client); |
257 | client = NULL; | 257 | client = NULL; |
258 | } | 258 | } |
259 | if (r_task != GNUNET_SCHEDULER_NO_TASK) | 259 | if (r_task != GNUNET_SCHEDULER_NO_TASK) |
@@ -374,7 +374,7 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
374 | } | 374 | } |
375 | GNUNET_CONTAINER_DLL_remove (req_head, req_tail, rh); | 375 | GNUNET_CONTAINER_DLL_remove (req_head, req_tail, rh); |
376 | GNUNET_free (rh); | 376 | GNUNET_free (rh); |
377 | GNUNET_CLIENT_disconnect (client, GNUNET_NO); | 377 | GNUNET_CLIENT_disconnect (client); |
378 | client = NULL; | 378 | client = NULL; |
379 | reconnect (); | 379 | reconnect (); |
380 | return; | 380 | return; |
@@ -382,7 +382,7 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
382 | if (GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE != ntohs (msg->type)) | 382 | if (GNUNET_MESSAGE_TYPE_RESOLVER_RESPONSE != ntohs (msg->type)) |
383 | { | 383 | { |
384 | GNUNET_break (0); | 384 | GNUNET_break (0); |
385 | GNUNET_CLIENT_disconnect (client, GNUNET_NO); | 385 | GNUNET_CLIENT_disconnect (client); |
386 | client = NULL; | 386 | client = NULL; |
387 | reconnect (); | 387 | reconnect (); |
388 | return; | 388 | return; |
@@ -417,7 +417,7 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
417 | rh->name_callback (rh->cls, NULL); | 417 | rh->name_callback (rh->cls, NULL); |
418 | GNUNET_CONTAINER_DLL_remove (req_head, req_tail, rh); | 418 | GNUNET_CONTAINER_DLL_remove (req_head, req_tail, rh); |
419 | GNUNET_free (rh); | 419 | GNUNET_free (rh); |
420 | GNUNET_CLIENT_disconnect (client, GNUNET_NO); | 420 | GNUNET_CLIENT_disconnect (client); |
421 | client = NULL; | 421 | client = NULL; |
422 | reconnect (); | 422 | reconnect (); |
423 | return; | 423 | return; |
@@ -473,7 +473,7 @@ handle_response (void *cls, const struct GNUNET_MessageHeader *msg) | |||
473 | rh->addr_callback (rh->cls, NULL, 0); | 473 | rh->addr_callback (rh->cls, NULL, 0); |
474 | GNUNET_CONTAINER_DLL_remove (req_head, req_tail, rh); | 474 | GNUNET_CONTAINER_DLL_remove (req_head, req_tail, rh); |
475 | GNUNET_free (rh); | 475 | GNUNET_free (rh); |
476 | GNUNET_CLIENT_disconnect (client, GNUNET_NO); | 476 | GNUNET_CLIENT_disconnect (client); |
477 | client = NULL; | 477 | client = NULL; |
478 | reconnect (); | 478 | reconnect (); |
479 | return; | 479 | return; |
@@ -643,7 +643,7 @@ process_requests () | |||
643 | (rh->timeout), GNUNET_YES, | 643 | (rh->timeout), GNUNET_YES, |
644 | &handle_response, rh)) | 644 | &handle_response, rh)) |
645 | { | 645 | { |
646 | GNUNET_CLIENT_disconnect (client, GNUNET_NO); | 646 | GNUNET_CLIENT_disconnect (client); |
647 | client = NULL; | 647 | client = NULL; |
648 | reconnect (); | 648 | reconnect (); |
649 | return; | 649 | return; |
diff --git a/src/util/test_client.c b/src/util/test_client.c index f9d961ab6..92b9ed49f 100644 --- a/src/util/test_client.c +++ b/src/util/test_client.c | |||
@@ -109,7 +109,7 @@ recv_bounce (void *cls, const struct GNUNET_MessageHeader *got) | |||
109 | msg.type = htons (MY_TYPE); | 109 | msg.type = htons (MY_TYPE); |
110 | msg.size = htons (sizeof (struct GNUNET_MessageHeader)); | 110 | msg.size = htons (sizeof (struct GNUNET_MessageHeader)); |
111 | GNUNET_assert (0 == memcmp (got, &msg, sizeof (struct GNUNET_MessageHeader))); | 111 | GNUNET_assert (0 == memcmp (got, &msg, sizeof (struct GNUNET_MessageHeader))); |
112 | GNUNET_CLIENT_disconnect (client, GNUNET_YES); | 112 | GNUNET_CLIENT_disconnect (client); |
113 | client = NULL; | 113 | client = NULL; |
114 | GNUNET_SERVER_destroy (server); | 114 | GNUNET_SERVER_destroy (server); |
115 | server = NULL; | 115 | server = NULL; |
diff --git a/src/util/test_server.c b/src/util/test_server.c index 6718c65d8..0faf61bee 100644 --- a/src/util/test_server.c +++ b/src/util/test_server.c | |||
@@ -54,7 +54,7 @@ finish_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
54 | GNUNET_assert (ok == 6); | 54 | GNUNET_assert (ok == 6); |
55 | ok = 0; | 55 | ok = 0; |
56 | GNUNET_SERVER_destroy (server); | 56 | GNUNET_SERVER_destroy (server); |
57 | GNUNET_CLIENT_disconnect (cc, GNUNET_NO); | 57 | GNUNET_CLIENT_disconnect (cc); |
58 | GNUNET_CONFIGURATION_destroy (cfg); | 58 | GNUNET_CONFIGURATION_destroy (cfg); |
59 | } | 59 | } |
60 | 60 | ||
diff --git a/src/util/test_server_disconnect.c b/src/util/test_server_disconnect.c index 8010695e8..c54f9cbc8 100644 --- a/src/util/test_server_disconnect.c +++ b/src/util/test_server_disconnect.c | |||
@@ -51,7 +51,7 @@ finish_up (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
51 | GNUNET_assert (ok == 5); | 51 | GNUNET_assert (ok == 5); |
52 | ok = 0; | 52 | ok = 0; |
53 | GNUNET_SERVER_destroy (server); | 53 | GNUNET_SERVER_destroy (server); |
54 | GNUNET_CLIENT_disconnect (cc, GNUNET_NO); | 54 | GNUNET_CLIENT_disconnect (cc); |
55 | GNUNET_CONFIGURATION_destroy (cfg); | 55 | GNUNET_CONFIGURATION_destroy (cfg); |
56 | } | 56 | } |
57 | 57 | ||
diff --git a/src/util/test_server_with_client.c b/src/util/test_server_with_client.c index 06a4b71d6..ad56071fa 100644 --- a/src/util/test_server_with_client.c +++ b/src/util/test_server_with_client.c | |||
@@ -89,7 +89,7 @@ recv_cb (void *cls, struct GNUNET_SERVER_Client *argclient, | |||
89 | break; | 89 | break; |
90 | case 4: | 90 | case 4: |
91 | ok++; | 91 | ok++; |
92 | GNUNET_CLIENT_disconnect (client, GNUNET_YES); | 92 | GNUNET_CLIENT_disconnect (client); |
93 | GNUNET_SERVER_receive_done (argclient, GNUNET_OK); | 93 | GNUNET_SERVER_receive_done (argclient, GNUNET_OK); |
94 | break; | 94 | break; |
95 | default: | 95 | default: |
diff --git a/src/util/test_server_with_client_unix.c b/src/util/test_server_with_client_unix.c index 99af4e8c3..eae80e4e8 100644 --- a/src/util/test_server_with_client_unix.c +++ b/src/util/test_server_with_client_unix.c | |||
@@ -68,7 +68,7 @@ recv_cb (void *cls, struct GNUNET_SERVER_Client *argclient, | |||
68 | break; | 68 | break; |
69 | case 4: | 69 | case 4: |
70 | ok++; | 70 | ok++; |
71 | GNUNET_CLIENT_disconnect (client, GNUNET_YES); | 71 | GNUNET_CLIENT_disconnect (client); |
72 | GNUNET_SERVER_receive_done (argclient, GNUNET_OK); | 72 | GNUNET_SERVER_receive_done (argclient, GNUNET_OK); |
73 | break; | 73 | break; |
74 | default: | 74 | default: |
diff --git a/src/util/test_service.c b/src/util/test_service.c index 049282d84..716e90d78 100644 --- a/src/util/test_service.c +++ b/src/util/test_service.c | |||
@@ -52,7 +52,7 @@ build_msg (void *cls, size_t size, void *buf) | |||
52 | GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader)); | 52 | GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader)); |
53 | msg->type = htons (MY_TYPE); | 53 | msg->type = htons (MY_TYPE); |
54 | msg->size = htons (sizeof (struct GNUNET_MessageHeader)); | 54 | msg->size = htons (sizeof (struct GNUNET_MessageHeader)); |
55 | GNUNET_CLIENT_disconnect (client, GNUNET_NO); | 55 | GNUNET_CLIENT_disconnect (client); |
56 | return sizeof (struct GNUNET_MessageHeader); | 56 | return sizeof (struct GNUNET_MessageHeader); |
57 | } | 57 | } |
58 | 58 | ||
diff --git a/src/vpn/vpn_api.c b/src/vpn/vpn_api.c index 31d17f8c9..5b70d19df 100644 --- a/src/vpn/vpn_api.c +++ b/src/vpn/vpn_api.c | |||
@@ -402,7 +402,7 @@ reconnect (struct GNUNET_VPN_Handle *vh) | |||
402 | GNUNET_CLIENT_notify_transmit_ready_cancel (vh->th); | 402 | GNUNET_CLIENT_notify_transmit_ready_cancel (vh->th); |
403 | vh->th = NULL; | 403 | vh->th = NULL; |
404 | } | 404 | } |
405 | GNUNET_CLIENT_disconnect (vh->client, GNUNET_NO); | 405 | GNUNET_CLIENT_disconnect (vh->client); |
406 | vh->client = NULL; | 406 | vh->client = NULL; |
407 | vh->request_id_gen = 0; | 407 | vh->request_id_gen = 0; |
408 | for (rr = vh->rr_head; NULL != rr; rr = rr->next) | 408 | for (rr = vh->rr_head; NULL != rr; rr = rr->next) |
@@ -591,7 +591,7 @@ GNUNET_VPN_disconnect (struct GNUNET_VPN_Handle *vh) | |||
591 | } | 591 | } |
592 | if (NULL != vh->client) | 592 | if (NULL != vh->client) |
593 | { | 593 | { |
594 | GNUNET_CLIENT_disconnect (vh->client, GNUNET_NO); | 594 | GNUNET_CLIENT_disconnect (vh->client); |
595 | vh->client = NULL; | 595 | vh->client = NULL; |
596 | } | 596 | } |
597 | if (GNUNET_SCHEDULER_NO_TASK != vh->rt) | 597 | if (GNUNET_SCHEDULER_NO_TASK != vh->rt) |