Ensure peer started callback recvs PeerContext
authorjah <jah@zadkiel.plus.com>
Sun, 25 Jun 2017 11:47:47 +0000 (12:47 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 25 Jun 2017 12:04:40 +0000 (14:04 +0200)
src/transport/transport-testing.c

index 53a44f338bdf84d459a8aa05e4c3a7acfb11ffa3..2aa6cdbb0e51986baab99b1fa0c76fb943aad46f 100644 (file)
@@ -413,7 +413,10 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct GNUNET_TRANSPORT_TESTING_Handle *tth
   else
     p->cb_cls = p;
   p->start_cb = start_cb;
-  p->start_cb_cls = start_cb_cls;
+  if (NULL != start_cb_cls)
+    p->start_cb_cls = start_cb_cls;
+  else
+    p->start_cb_cls = p;
   GNUNET_CONTAINER_DLL_insert (tth->p_head,
                                tth->p_tail,
                                p);