diff options
author | xrs <xrs@mail36.net> | 2017-03-13 20:27:45 +0100 |
---|---|---|
committer | xrs <xrs@mail36.net> | 2017-03-13 20:27:45 +0100 |
commit | 501c1f7794be6e8a2ea15200dbdadd4c066edb89 (patch) | |
tree | 323d6d639ed513587b07e972f79589c7d96649e7 /src | |
parent | ea1d45f9f6fda99b0e8dd3ada75433b650983113 (diff) | |
download | gnunet-501c1f7794be6e8a2ea15200dbdadd4c066edb89.tar.gz gnunet-501c1f7794be6e8a2ea15200dbdadd4c066edb89.zip |
test_multicast_2peers.c: fix code style
Diffstat (limited to 'src')
-rw-r--r-- | src/multicast/test_multicast_2peers.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/multicast/test_multicast_2peers.c b/src/multicast/test_multicast_2peers.c index 02e60a905..9d1f42063 100644 --- a/src/multicast/test_multicast_2peers.c +++ b/src/multicast/test_multicast_2peers.c | |||
@@ -117,6 +117,7 @@ member_join_request (void *cls, | |||
117 | 117 | ||
118 | } | 118 | } |
119 | 119 | ||
120 | |||
120 | int notify (void *cls, | 121 | int notify (void *cls, |
121 | size_t *data_size, | 122 | size_t *data_size, |
122 | void *data) | 123 | void *data) |
@@ -155,6 +156,7 @@ member_join_decision (void *cls, | |||
155 | } | 156 | } |
156 | } | 157 | } |
157 | 158 | ||
159 | |||
158 | static void | 160 | static void |
159 | member_message (void *cls, | 161 | member_message (void *cls, |
160 | const struct GNUNET_MULTICAST_MessageHeader *msg) | 162 | const struct GNUNET_MULTICAST_MessageHeader *msg) |
@@ -174,6 +176,7 @@ member_message (void *cls, | |||
174 | GNUNET_SCHEDULER_shutdown (); | 176 | GNUNET_SCHEDULER_shutdown (); |
175 | } | 177 | } |
176 | 178 | ||
179 | |||
177 | static void | 180 | static void |
178 | origin_join_request (void *cls, | 181 | origin_join_request (void *cls, |
179 | const struct GNUNET_CRYPTO_EcdsaPublicKey *member_pub_key, | 182 | const struct GNUNET_CRYPTO_EcdsaPublicKey *member_pub_key, |
@@ -208,6 +211,7 @@ origin_join_request (void *cls, | |||
208 | result = GNUNET_OK; | 211 | result = GNUNET_OK; |
209 | } | 212 | } |
210 | 213 | ||
214 | |||
211 | int | 215 | int |
212 | origin_notify (void *cls, | 216 | origin_notify (void *cls, |
213 | size_t *data_size, | 217 | size_t *data_size, |
@@ -239,6 +243,7 @@ origin_request (void *cls, | |||
239 | NULL); | 243 | NULL); |
240 | } | 244 | } |
241 | 245 | ||
246 | |||
242 | static void | 247 | static void |
243 | origin_message (void *cls, | 248 | origin_message (void *cls, |
244 | const struct GNUNET_MULTICAST_MessageHeader *msg) | 249 | const struct GNUNET_MULTICAST_MessageHeader *msg) |
@@ -255,17 +260,18 @@ service_connect1 (void *cls, | |||
255 | { | 260 | { |
256 | member = ca_result; | 261 | member = ca_result; |
257 | 262 | ||
258 | if (NULL != member) | 263 | if (NULL == member) |
259 | { | 264 | { |
260 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Connected to multicast service of member\n"); | 265 | result = GNUNET_SYSERR; |
266 | GNUNET_SCHEDULER_shutdown (); | ||
261 | } | 267 | } |
262 | else | 268 | else |
263 | { | 269 | { |
264 | result = GNUNET_SYSERR; | 270 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Connected to multicast service of member\n"); |
265 | GNUNET_SCHEDULER_shutdown (); | ||
266 | } | 271 | } |
267 | } | 272 | } |
268 | 273 | ||
274 | |||
269 | static void | 275 | static void |
270 | multicast_da1 (void *cls, | 276 | multicast_da1 (void *cls, |
271 | void * op_result) | 277 | void * op_result) |
@@ -349,9 +355,10 @@ peer_information_cb (void *cls, | |||
349 | multicast_da1, /* callback to be called when closing the | 355 | multicast_da1, /* callback to be called when closing the |
350 | opened service connection */ | 356 | opened service connection */ |
351 | NULL); /* closure for the above two callbacks */ | 357 | NULL); /* closure for the above two callbacks */ |
352 | } | 358 | } |
353 | } | 359 | } |
354 | 360 | ||
361 | |||
355 | /** | 362 | /** |
356 | * Test logic of peer "0" being origin starts here. | 363 | * Test logic of peer "0" being origin starts here. |
357 | * | 364 | * |
@@ -485,7 +492,7 @@ main (int argc, char *argv[]) | |||
485 | 492 | ||
486 | result = GNUNET_SYSERR; | 493 | result = GNUNET_SYSERR; |
487 | ret = GNUNET_TESTBED_test_run | 494 | ret = GNUNET_TESTBED_test_run |
488 | ("test-multicast-multipeer", /* test case name */ | 495 | ("test-multicast-2peers", /* test case name */ |
489 | "test_multicast.conf", /* template configuration */ | 496 | "test_multicast.conf", /* template configuration */ |
490 | NUM_PEERS, /* number of peers to start */ | 497 | NUM_PEERS, /* number of peers to start */ |
491 | 0LL, /* Event mask - set to 0 for no event notifications */ | 498 | 0LL, /* Event mask - set to 0 for no event notifications */ |
@@ -498,4 +505,5 @@ main (int argc, char *argv[]) | |||
498 | return 0; | 505 | return 0; |
499 | } | 506 | } |
500 | 507 | ||
501 | /* end of test_multicast_multipeer.c */ | 508 | |
509 | /* end of test_multicast_2peers.c */ | ||