summaryrefslogtreecommitdiff
path: root/src/testing/test_testing_reconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/test_testing_reconnect.c')
-rw-r--r--src/testing/test_testing_reconnect.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/testing/test_testing_reconnect.c b/src/testing/test_testing_reconnect.c
index 69b871303..36675012f 100644
--- a/src/testing/test_testing_reconnect.c
+++ b/src/testing/test_testing_reconnect.c
@@ -43,6 +43,8 @@ static struct GNUNET_CONFIGURATION_Handle *c1;
43 43
44static struct GNUNET_CONFIGURATION_Handle *c2; 44static struct GNUNET_CONFIGURATION_Handle *c2;
45 45
46static struct GNUNET_TESTING_ConnectContext *cc;
47
46/** 48/**
47 * How many start-connect-stop iterations should we do? 49 * How many start-connect-stop iterations should we do?
48 */ 50 */
@@ -55,7 +57,7 @@ static int phase;
55 * stopping them again. 57 * stopping them again.
56 */ 58 */
57static void 59static void
58run_phase (); 60run_phase (void);
59 61
60static void 62static void
61end2_cb (void *cls, const char *emsg) 63end2_cb (void *cls, const char *emsg)
@@ -123,6 +125,7 @@ my_connect_complete (void *cls, const struct GNUNET_PeerIdentity *first,
123 struct GNUNET_TESTING_Daemon *second_daemon, 125 struct GNUNET_TESTING_Daemon *second_daemon,
124 const char *emsg) 126 const char *emsg)
125{ 127{
128 cc = NULL;
126#if VERBOSE 129#if VERBOSE
127 fprintf (stderr, "Peer %s ", GNUNET_i2s (first)); 130 fprintf (stderr, "Peer %s ", GNUNET_i2s (first));
128 fprintf (stderr, "connected to %s\n", GNUNET_i2s (second)); 131 fprintf (stderr, "connected to %s\n", GNUNET_i2s (second));
@@ -143,8 +146,8 @@ my_cb2 (void *cls, const struct GNUNET_PeerIdentity *id,
143 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon `%s' started.\n", 146 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Daemon `%s' started.\n",
144 GNUNET_i2s (id)); 147 GNUNET_i2s (id));
145#endif 148#endif
146 GNUNET_TESTING_daemons_connect (d1, d2, TIMEOUT, CONNECT_ATTEMPTS, GNUNET_YES, 149 cc = GNUNET_TESTING_daemons_connect (d1, d2, TIMEOUT, CONNECT_ATTEMPTS, GNUNET_YES,
147 &my_connect_complete, NULL); 150 &my_connect_complete, NULL);
148} 151}
149 152
150 153