aboutsummaryrefslogtreecommitdiff
path: root/src/util/connection.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-03-12 17:09:36 +0000
committerChristian Grothoff <christian@grothoff.org>2010-03-12 17:09:36 +0000
commit81b31b0577c1c4e3ddfc736f65d3329b5afad1a9 (patch)
tree5aab336a58f87f1729ad0f26ecfc91b4f7256049 /src/util/connection.c
parentce5766138d2e443b8d13bdc5d5134a1a78745cab (diff)
downloadgnunet-81b31b0577c1c4e3ddfc736f65d3329b5afad1a9.tar.gz
gnunet-81b31b0577c1c4e3ddfc736f65d3329b5afad1a9.zip
fixes
Diffstat (limited to 'src/util/connection.c')
-rw-r--r--src/util/connection.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/util/connection.c b/src/util/connection.c
index 10f53dcf9..22a75691b 100644
--- a/src/util/connection.c
+++ b/src/util/connection.c
@@ -931,11 +931,6 @@ void
931GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock, 931GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
932 int finish_pending_write) 932 int finish_pending_write)
933{ 933{
934 if ((sock->write_buffer_off == 0) && (sock->dns_active != NULL))
935 {
936 GNUNET_RESOLVER_request_cancel (sock->dns_active);
937 sock->dns_active = NULL;
938 }
939 if (GNUNET_NO == finish_pending_write) 934 if (GNUNET_NO == finish_pending_write)
940 { 935 {
941 if (sock->write_task != GNUNET_SCHEDULER_NO_TASK) 936 if (sock->write_task != GNUNET_SCHEDULER_NO_TASK)
@@ -943,8 +938,14 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
943 GNUNET_SCHEDULER_cancel (sock->sched, 938 GNUNET_SCHEDULER_cancel (sock->sched,
944 sock->write_task); 939 sock->write_task);
945 sock->write_task = GNUNET_SCHEDULER_NO_TASK; 940 sock->write_task = GNUNET_SCHEDULER_NO_TASK;
941 sock->write_buffer_off = 0;
946 } 942 }
947 } 943 }
944 if ((sock->write_buffer_off == 0) && (sock->dns_active != NULL))
945 {
946 GNUNET_RESOLVER_request_cancel (sock->dns_active);
947 sock->dns_active = NULL;
948 }
948 GNUNET_assert (sock->sched != NULL); 949 GNUNET_assert (sock->sched != NULL);
949 GNUNET_SCHEDULER_add_now (sock->sched, 950 GNUNET_SCHEDULER_add_now (sock->sched,
950 &destroy_continuation, sock); 951 &destroy_continuation, sock);