adding a few more asserts to help debug
authorChristian Grothoff <christian@grothoff.org>
Sun, 15 Nov 2009 13:27:52 +0000 (13:27 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 15 Nov 2009 13:27:52 +0000 (13:27 +0000)
src/util/connection.c

index 6463972bed7c06c09469c6f4f8c06abc352981fb..c12ea2751e35d7fd0fb11e63cf730fb441371ef6 100644 (file)
@@ -678,6 +678,8 @@ connect_probe_continuation (void *cls,
         connect_fail_continuation (h);
       return;
     }
+  GNUNET_assert (h->sock == NULL);
+  GNUNET_assert (ap->sock != NULL);
   h->sock = ap->sock;
   GNUNET_assert (h->addr == NULL);
   h->addr = GNUNET_malloc (ap->addrlen);
@@ -721,6 +723,7 @@ try_connect_using_address (void *cls,
     }
   if (h->sock != NULL)
     return;                     /* already connected */
+  GNUNET_assert (h->addr == NULL);
   /* try to connect */
 #if DEBUG_CONNECTION
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,