error msg
[oweals/gnunet.git] / src / transport / transport-testing.c
index f1c06ebc018b068f8aa866a3318c30f0d67fe3a5..32331d9d9fce4d1373acd06c91eb0eb4b84a5f0b 100644 (file)
@@ -71,19 +71,15 @@ notify_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
                 const struct GNUNET_ATS_Information *ats, uint32_t ats_count)
 {
   struct PeerContext *p = cls;
+  char *p2_s;
+  struct PeerContext *p2;
 
-  /* Find PeerContext */
-  GNUNET_assert (p != 0);
-  GNUNET_assert (p->tth != NULL);
-  struct PeerContext *p2 = find_peer_context (p->tth, peer);
-
-  if (p == NULL)
-    return;
+  GNUNET_assert (NULL != p);
+  GNUNET_assert (NULL != p->tth);
+  p2 = find_peer_context (p->tth, peer);
   if (p->nc != NULL)
     p->nc (p->cb_cls, peer, ats, ats_count);
 
-  char *p2_s;
-
   if (p2 != NULL)
     GNUNET_asprintf (&p2_s, "%u (`%s')", p2->no, GNUNET_i2s (&p2->id));
   else
@@ -212,7 +208,7 @@ try_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   GNUNET_TRANSPORT_offer_hello (cc->th_p1,
                                 (const struct GNUNET_MessageHeader *) cc->
                                 p2->hello, NULL, NULL);
-  GNUNET_TRANSPORT_try_connect (cc->th_p1, &p2->id);
+  GNUNET_TRANSPORT_try_connect (cc->th_p1, &p2->id, NULL, NULL); /*FIXME TRY_CONNECT change */
 
   cc->tct =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &try_connect, cc);
@@ -788,5 +784,4 @@ fail:
 }
 
 
-
 /* end of transport-testing.c */