aboutsummaryrefslogtreecommitdiff
path: root/src/testing/test_testing_connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing/test_testing_connect.c')
-rw-r--r--src/testing/test_testing_connect.c47
1 files changed, 22 insertions, 25 deletions
diff --git a/src/testing/test_testing_connect.c b/src/testing/test_testing_connect.c
index 631b224f5..19e3bb1c0 100644
--- a/src/testing/test_testing_connect.c
+++ b/src/testing/test_testing_connect.c
@@ -48,33 +48,33 @@ end2_cb (void *cls, const char *emsg)
48{ 48{
49 49
50 if (emsg != NULL) 50 if (emsg != NULL)
51 { 51 {
52 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Ending with error: %s\n", emsg); 52 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Ending with error: %s\n", emsg);
53 ok = 1; 53 ok = 1;
54 } 54 }
55 else 55 else
56 { 56 {
57#if VERBOSE 57#if VERBOSE
58 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 58 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
59 "Both daemons terminated, will now exit.\n"); 59 "Both daemons terminated, will now exit.\n");
60#endif 60#endif
61 ok = 0; 61 ok = 0;
62 } 62 }
63} 63}
64 64
65static void 65static void
66end1_cb (void *cls, const char *emsg) 66end1_cb (void *cls, const char *emsg)
67{ 67{
68 if (emsg != NULL) 68 if (emsg != NULL)
69 { 69 {
70 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Stopping daemon 1 gave: %s\n", 70 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Stopping daemon 1 gave: %s\n",
71 emsg); 71 emsg);
72 ok = 1; 72 ok = 1;
73 } 73 }
74 else 74 else
75 { 75 {
76 ok = 0; 76 ok = 0;
77 } 77 }
78 78
79 GNUNET_TESTING_daemon_stop (d2, TIMEOUT, &end2_cb, NULL, GNUNET_YES, 79 GNUNET_TESTING_daemon_stop (d2, TIMEOUT, &end2_cb, NULL, GNUNET_YES,
80 GNUNET_NO); 80 GNUNET_NO);
@@ -117,8 +117,7 @@ my_cb2 (void *cls,
117#endif 117#endif
118 GNUNET_TESTING_daemons_connect (d1, d2, 118 GNUNET_TESTING_daemons_connect (d1, d2,
119 TIMEOUT, CONNECT_ATTEMPTS, 119 TIMEOUT, CONNECT_ATTEMPTS,
120 GNUNET_YES, 120 GNUNET_YES, &my_connect_complete, NULL);
121 &my_connect_complete, NULL);
122} 121}
123 122
124 123
@@ -133,9 +132,8 @@ my_cb1 (void *cls,
133 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 132 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
134 "Daemon `%s' started.\n", GNUNET_i2s (id)); 133 "Daemon `%s' started.\n", GNUNET_i2s (id));
135#endif 134#endif
136 d2 = 135 d2 = GNUNET_TESTING_daemon_start (c2, TIMEOUT, GNUNET_NO, NULL, NULL, 0, NULL,
137 GNUNET_TESTING_daemon_start (c2, TIMEOUT, GNUNET_NO, NULL, NULL, 0, NULL, NULL, NULL, 136 NULL, NULL, &my_cb2, NULL);
138 &my_cb2, NULL);
139 GNUNET_assert (d2 != NULL); 137 GNUNET_assert (d2 != NULL);
140 138
141} 139}
@@ -154,9 +152,8 @@ run (void *cls,
154 GNUNET_CONFIGURATION_parse (c1, "test_testing_connect_peer1.conf"); 152 GNUNET_CONFIGURATION_parse (c1, "test_testing_connect_peer1.conf");
155 c2 = GNUNET_CONFIGURATION_create (); 153 c2 = GNUNET_CONFIGURATION_create ();
156 GNUNET_CONFIGURATION_parse (c2, "test_testing_connect_peer2.conf"); 154 GNUNET_CONFIGURATION_parse (c2, "test_testing_connect_peer2.conf");
157 d1 = 155 d1 = GNUNET_TESTING_daemon_start (c1, TIMEOUT, GNUNET_NO, NULL, NULL, 0, NULL,
158 GNUNET_TESTING_daemon_start (c1, TIMEOUT, GNUNET_NO, NULL, NULL, 0, NULL, NULL, NULL, 156 NULL, NULL, &my_cb1, NULL);
159 &my_cb1, NULL);
160 GNUNET_assert (d1 != NULL); 157 GNUNET_assert (d1 != NULL);
161} 158}
162 159