-more logging
authorChristian Grothoff <christian@grothoff.org>
Wed, 16 May 2012 11:40:00 +0000 (11:40 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 16 May 2012 11:40:00 +0000 (11:40 +0000)
src/transport/gnunet-service-transport_neighbours.c
src/transport/plugin_transport_tcp.c

index f3e67fb66607ec1f11697ed4a7e2a881d5b3cc92..450da0637564de7d3ba7291de452905d42466568 100644 (file)
@@ -283,7 +283,7 @@ enum State
   /**
    * fresh peer or completely disconnected
    */
-  S_NOT_CONNECTED,
+  S_NOT_CONNECTED = 0,
 
   /**
    * Asked to initiate connection, trying to get address from ATS
@@ -1415,6 +1415,9 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target, const void *msg,
   }
   if ((NULL == n->primary_address.session) && (NULL == n->primary_address.address))
   {
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+               "GST_neighbours_sent called in state %d\n",
+               n->state);
     GNUNET_break (0);
     if (NULL != cont)
       cont (cont_cls, GNUNET_SYSERR);
index 880f5078c53ad429bbd7069e95ef47c1ba31e5b9..076d5db71442f1b76aff9c707c531397e5f8f8f8 100644 (file)
@@ -1892,10 +1892,10 @@ handle_tcp_data (void *cls, struct GNUNET_SERVER_Client *client,
     
     GNUNET_SERVER_client_get_address (client, &vaddr, &alen);
     LOG (GNUNET_ERROR_TYPE_ERROR, 
-                     "Received unexpected %u bytes of type %u from `%s'\n",
-                     (unsigned int) ntohs (message->size),
-                     (unsigned int) ntohs (message->type),
-                     GNUNET_a2s(vaddr, alen));
+        "Received unexpected %u bytes of type %u from `%s'\n",
+        (unsigned int) ntohs (message->size),
+        (unsigned int) ntohs (message->type),
+        GNUNET_a2s(vaddr, alen));
     GNUNET_break_op (0);
     GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
     GNUNET_free_non_null(vaddr);