diff options
Diffstat (limited to 'src/core/test_core_api.c')
-rw-r--r-- | src/core/test_core_api.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c index be3edf974..e63fc9f9d 100644 --- a/src/core/test_core_api.c +++ b/src/core/test_core_api.c | |||
@@ -76,7 +76,7 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message) | |||
76 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 76 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
77 | "Received (my) `%s' from transport service\n", "HELLO"); | 77 | "Received (my) `%s' from transport service\n", "HELLO"); |
78 | GNUNET_assert (message != NULL); | 78 | GNUNET_assert (message != NULL); |
79 | if ((p == &p1) && (p2.th != NULL)) | 79 | if ((p == &p1) && (p2.th != NULL)) |
80 | GNUNET_TRANSPORT_offer_hello (p2.th, message, NULL, NULL); | 80 | GNUNET_TRANSPORT_offer_hello (p2.th, message, NULL, NULL); |
81 | if ((p == &p2) && (p1.th != NULL)) | 81 | if ((p == &p2) && (p1.th != NULL)) |
82 | GNUNET_TRANSPORT_offer_hello (p1.th, message, NULL, NULL); | 82 | GNUNET_TRANSPORT_offer_hello (p1.th, message, NULL, NULL); |
@@ -165,7 +165,8 @@ transmit_ready (void *cls, size_t size, void *buf) | |||
165 | 165 | ||
166 | static void | 166 | static void |
167 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, | 167 | connect_notify (void *cls, const struct GNUNET_PeerIdentity *peer, |
168 | const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count) | 168 | const struct GNUNET_ATS_Information *atsi, |
169 | unsigned int atsi_count) | ||
169 | { | 170 | { |
170 | struct PeerContext *pc = cls; | 171 | struct PeerContext *pc = cls; |
171 | 172 | ||
@@ -218,7 +219,8 @@ disconnect_notify (void *cls, const struct GNUNET_PeerIdentity *peer) | |||
218 | static int | 219 | static int |
219 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 220 | inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
220 | const struct GNUNET_MessageHeader *message, | 221 | const struct GNUNET_MessageHeader *message, |
221 | const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count) | 222 | const struct GNUNET_ATS_Information *atsi, |
223 | unsigned int atsi_count) | ||
222 | { | 224 | { |
223 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 225 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
224 | "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other)); | 226 | "Core provides inbound data from `%4s'.\n", GNUNET_i2s (other)); |
@@ -229,7 +231,8 @@ inbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | |||
229 | static int | 231 | static int |
230 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | 232 | outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, |
231 | const struct GNUNET_MessageHeader *message, | 233 | const struct GNUNET_MessageHeader *message, |
232 | const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count) | 234 | const struct GNUNET_ATS_Information *atsi, |
235 | unsigned int atsi_count) | ||
233 | { | 236 | { |
234 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 237 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
235 | "Core notifies about outbound data for `%4s'.\n", | 238 | "Core notifies about outbound data for `%4s'.\n", |
@@ -242,7 +245,8 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other, | |||
242 | static int | 245 | static int |
243 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, | 246 | process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer, |
244 | const struct GNUNET_MessageHeader *message, | 247 | const struct GNUNET_MessageHeader *message, |
245 | const struct GNUNET_ATS_Information *atsi, unsigned int atsi_count) | 248 | const struct GNUNET_ATS_Information *atsi, |
249 | unsigned int atsi_count) | ||
246 | { | 250 | { |
247 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving message from `%4s'.\n", | 251 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Receiving message from `%4s'.\n", |
248 | GNUNET_i2s (peer)); | 252 | GNUNET_i2s (peer)); |
@@ -296,9 +300,8 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server, | |||
296 | /* connect p2 */ | 300 | /* connect p2 */ |
297 | p2.ch = | 301 | p2.ch = |
298 | GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify, | 302 | GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify, |
299 | &disconnect_notify, &inbound_notify, | 303 | &disconnect_notify, &inbound_notify, GNUNET_YES, |
300 | GNUNET_YES, &outbound_notify, GNUNET_YES, | 304 | &outbound_notify, GNUNET_YES, handlers); |
301 | handlers); | ||
302 | } | 305 | } |
303 | else | 306 | else |
304 | { | 307 | { |
@@ -344,8 +347,8 @@ run (void *cls, char *const *args, const char *cfgfile, | |||
344 | &terminate_task_error, NULL); | 347 | &terminate_task_error, NULL); |
345 | p1.ch = | 348 | p1.ch = |
346 | GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify, | 349 | GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify, |
347 | &disconnect_notify, &inbound_notify, | 350 | &disconnect_notify, &inbound_notify, GNUNET_YES, |
348 | GNUNET_YES, &outbound_notify, GNUNET_YES, handlers); | 351 | &outbound_notify, GNUNET_YES, handlers); |
349 | } | 352 | } |
350 | 353 | ||
351 | 354 | ||