fixing mantis #18773
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 21 Oct 2011 09:38:56 +0000 (09:38 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 21 Oct 2011 09:38:56 +0000 (09:38 +0000)
src/ats/ats_api_scheduling.c
src/transport/gnunet-service-transport_neighbours.c

index 075d776e536b324a27c0ea8091b1e26c0451c908..1dd7ad36f05958481d8d355c90e250fd04985587 100644 (file)
@@ -209,6 +209,14 @@ transmit_message_to_ats (void *cls,
   char *cbuf;
 
   sh->th = NULL;
+  if ( (size == 0) || (buf == NULL))
+  {
+    GNUNET_CLIENT_disconnect (sh->client, GNUNET_NO);
+    sh->client = NULL;
+    sh->task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+                                             &reconnect_task, sh);
+    return 0;
+  }
   ret = 0;
   cbuf = buf;
   while ( (NULL != (p = sh->pending_head)) &&
@@ -251,7 +259,7 @@ do_transmit (struct GNUNET_ATS_SchedulingHandle *sh)
   sh->th = GNUNET_CLIENT_notify_transmit_ready (sh->client,
                                                p->size,
                                                GNUNET_TIME_UNIT_FOREVER_REL,
-                                               GNUNET_YES,
+                                               GNUNET_NO,
                                                &transmit_message_to_ats, sh);
 }
 
index efb94b6f1a89e13ff149d2679a8723d03e8d04e9..486be2314bebdcc3cfac5911b2433e2632387cb8 100644 (file)
@@ -404,7 +404,7 @@ try_transmission_to_peer (struct NeighbourMapEntry *n)
 
   if  (((n->session == NULL) && (n->addr == NULL) && (n->addrlen == 0)))
   {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "No address peer for peer `%s'\n",
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "No address for peer `%s'\n",
                 GNUNET_i2s (&n->id));
     transmit_send_continuation (mq, &n->id, GNUNET_SYSERR);
     n->transmission_task = GNUNET_SCHEDULER_add_now (&transmission_task, n);