From: Christian Grothoff Date: Fri, 12 Mar 2010 14:46:26 +0000 (+0000) Subject: keep until server done call X-Git-Tag: initial-import-from-subversion-38251~22493 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9ed8634740c4b57fb66c7f0fe6bd9e122e8c3e1f;p=oweals%2Fgnunet.git keep until server done call --- diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c index fac1ff1d0..1454504e8 100644 --- a/src/datastore/gnunet-service-datastore.c +++ b/src/datastore/gnunet-service-datastore.c @@ -454,9 +454,8 @@ transmit_callback (void *cls, if (tcc->tc != NULL) tcc->tc (tcc->tc_cls, GNUNET_SYSERR); if (GNUNET_YES == tcc->end) - { - GNUNET_SERVER_receive_done (tcc->client, GNUNET_SYSERR); - } + GNUNET_SERVER_receive_done (tcc->client, GNUNET_SYSERR); + GNUNET_SERVER_client_drop (tcc->client); GNUNET_free (tcc->msg); GNUNET_free (tcc); return 0; @@ -476,6 +475,7 @@ transmit_callback (void *cls, "Response transmitted, more pending!\n"); #endif } + GNUNET_SERVER_client_drop (tcc->client); GNUNET_free (tcc->msg); GNUNET_free (tcc); return msize; @@ -510,9 +510,9 @@ transmit (struct GNUNET_SERVER_Client *client, tcc->end = end; if (NULL == (tcc->th = GNUNET_SERVER_notify_transmit_ready (client, - ntohs(msg->size), - GNUNET_TIME_UNIT_FOREVER_REL, - &transmit_callback, + ntohs(msg->size), + GNUNET_TIME_UNIT_FOREVER_REL, + &transmit_callback, tcc))) { GNUNET_break (0); @@ -530,6 +530,7 @@ transmit (struct GNUNET_SERVER_Client *client, GNUNET_free (tcc); return; } + GNUNET_SERVER_client_keep (client); GNUNET_CONTAINER_DLL_insert (tcc_head, tcc_tail, tcc);