aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-07-07 06:27:10 +0000
committerChristian Grothoff <christian@grothoff.org>2010-07-07 06:27:10 +0000
commitac2de52a5de68f6f4f13b7aa01a481869fffc6aa (patch)
tree856c9f0b2f55f8cae99f3c7b3bf22beaecbf58da /src/util
parentc1a3c11f8665432d9db6d549c28c0329668e66af (diff)
downloadgnunet-ac2de52a5de68f6f4f13b7aa01a481869fffc6aa.tar.gz
gnunet-ac2de52a5de68f6f4f13b7aa01a481869fffc6aa.zip
hacks from trip
Diffstat (limited to 'src/util')
-rw-r--r--src/util/server_nc.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/util/server_nc.c b/src/util/server_nc.c
index 1cf3df8bd..3bab691e9 100644
--- a/src/util/server_nc.c
+++ b/src/util/server_nc.c
@@ -164,6 +164,11 @@ handle_client_disconnect (void *cls,
164 } 164 }
165 if (pos == NULL) 165 if (pos == NULL)
166 return; 166 return;
167#if DEBUG_SERVER_NC
168 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
169 "Client disconnected, cleaning up %u messages in NC queue\n",
170 pos->num_pending);
171#endif
167 if (prev == NULL) 172 if (prev == NULL)
168 nc->clients = pos->next; 173 nc->clients = pos->next;
169 else 174 else
@@ -285,6 +290,10 @@ transmit_message (void *cls,
285 if (buf == NULL) 290 if (buf == NULL)
286 { 291 {
287 /* 'cl' should be freed via disconnect notification shortly */ 292 /* 'cl' should be freed via disconnect notification shortly */
293#if DEBUG_SERVER_NC
294 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
295 "Failed to transmit message from NC queue to client\n");
296#endif
288 return 0; 297 return 0;
289 } 298 }
290 ret = 0; 299 ret = 0;
@@ -310,11 +319,18 @@ transmit_message (void *cls,
310 cl->num_pending--; 319 cl->num_pending--;
311 } 320 }
312 if (cl->pending_head != NULL) 321 if (cl->pending_head != NULL)
313 cl->th = GNUNET_SERVER_notify_transmit_ready (cl->client, 322 {
314 ntohs (cl->pending_head->msg->size), 323#if DEBUG_SERVER_NC
315 GNUNET_TIME_UNIT_FOREVER_REL, 324 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
316 &transmit_message, 325 "Have %u messages left in NC queue, will try transmission again\n",
317 cl); 326 cl->num_pending);
327#endif
328 cl->th = GNUNET_SERVER_notify_transmit_ready (cl->client,
329 ntohs (cl->pending_head->msg->size),
330 GNUNET_TIME_UNIT_FOREVER_REL,
331 &transmit_message,
332 cl);
333 }
318 return ret; 334 return ret;
319} 335}
320 336