-fix off-by-1
[oweals/gnunet.git] / src / dht / gnunet-service-xdht_clients.c
index e08ccf792b999159e9640676a5cfdd677a8f5ac1..bc5504ebe07ce600b37b85e06c7d6154b231dd3e 100644 (file)
@@ -318,13 +318,18 @@ send_reply_to_client (void *cls, size_t size, void *buf)
                                  reply);
     memcpy (&cbuf[off], reply->msg, msize);
     GNUNET_free (reply);
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitting %u bytes to client %p\n",
-                msize, client->client_handle);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Transmitting %u bytes to client %p\n",
+                (unsigned int) msize,
+                client->client_handle);
     off += msize;
   }
   process_pending_messages (client);
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Transmitted %u/%u bytes to client %p\n",
-              (unsigned int) off, (unsigned int) size, client->client_handle);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Transmitted %u/%u bytes to client %p\n",
+              (unsigned int) off,
+              (unsigned int) size,
+              client->client_handle);
   return off;
 }
 
@@ -877,12 +882,8 @@ transmit_next_request_task (void *cls)
 {
   struct ClientQueryRecord *cqr;
   struct GNUNET_TIME_Relative delay;
-  const struct GNUNET_SCHEDULER_TaskContext *tc;
 
   retry_task = NULL;
-  tc = GNUNET_SCHEDULER_get_task_context ();
-  if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
-    return;
   while (NULL != (cqr = GNUNET_CONTAINER_heap_remove_root (retry_heap)))
   {
     cqr->hnode = NULL;