aboutsummaryrefslogtreecommitdiff
path: root/src/util/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/client.c')
-rw-r--r--src/util/client.c13
1 files changed, 5 insertions, 8 deletions
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 */
396void 394void
397GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock, 395GNUNET_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}