assert earlier
authorChristian Grothoff <christian@grothoff.org>
Sun, 15 Aug 2010 14:14:47 +0000 (14:14 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 15 Aug 2010 14:14:47 +0000 (14:14 +0000)
src/util/connection.c

index 57720c07e413ead7951ee770bdf4dc07ee6db8b9..cfe7fee9b20fe1f3a7f514a63b5900daae585aea 100644 (file)
@@ -721,6 +721,7 @@ connect_probe_continuation (void *cls,
   int error;
   unsigned int len;
 
+  GNUNET_assert (ap->sock != NULL);
   GNUNET_CONTAINER_DLL_remove (h->ap_head, h->ap_tail, ap);
   len = sizeof (error);
   errno = 0;
@@ -738,7 +739,6 @@ connect_probe_continuation (void *cls,
       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);