[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] branch master updated (94c86ded6 -> 87798f3ef)
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] branch master updated (94c86ded6 -> 87798f3ef) |
Date: |
Fri, 10 Mar 2017 20:40:56 +0100 |
This is an automated email from the git hooks/post-receive script.
xrs pushed a change to branch master
in repository gnunet.
from 94c86ded6 check GNUNET_PROGRAM_run return value
new 4666ecb93 test_multicast_2peers: formatting and stuff
new 16d8bc7e0 test_multicast_2peers: formatting and stuff
new 87798f3ef Merge branch 'master' of ssh://gnunet.org/gnunet
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/multicast/test_multicast_2peers.c | 51 ++++++++++++++++++++---------------
1 file changed, 29 insertions(+), 22 deletions(-)
diff --git a/src/multicast/test_multicast_2peers.c
b/src/multicast/test_multicast_2peers.c
index 929637e8e..02e60a905 100644
--- a/src/multicast/test_multicast_2peers.c
+++ b/src/multicast/test_multicast_2peers.c
@@ -19,8 +19,9 @@
*/
/**
- * @file multicast/test_multicast_multipeers.c
- * @brief Tests for the Multicast API with multiple peers.
+ * @file multicast/test_multicast_2peers.c
+ * @brief Tests for the Multicast API with two peers doing the ping
+ * pong test.
* @author xrs
*/
@@ -151,7 +152,6 @@ member_join_decision (void *cls,
0,
notify,
NULL);
-
}
}
@@ -159,7 +159,8 @@ static void
member_message (void *cls,
const struct GNUNET_MULTICAST_MessageHeader *msg)
{
- if (0 != strncmp ("pong", (char *)&msg[1], 4)) {
+ if (0 != strncmp ("pong", (char *)&msg[1], 4))
+ {
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "member did not receive pong\n");
result = GNUNET_SYSERR;
GNUNET_SCHEDULER_shutdown ();
@@ -228,9 +229,8 @@ origin_request (void *cls,
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "origin receives: %s\n", (char
*)&req[1]);
- if (0 != strncmp ("ping", (char *)&req[1], 4)) {
+ if (0 != strncmp ("ping", (char *)&req[1], 4))
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "origin didn't reveice a correct
request");
- }
GNUNET_MULTICAST_origin_to_all (origin,
0,
@@ -255,10 +255,15 @@ service_connect1 (void *cls,
{
member = ca_result;
- if (NULL != member)
+ if (NULL != member)
+ {
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Connected to multicast service of
member\n");
+ }
else
+ {
result = GNUNET_SYSERR;
+ GNUNET_SCHEDULER_shutdown ();
+ }
}
static void
@@ -316,7 +321,8 @@ peer_information_cb (void *cls,
{
int i = (int) (long) cls;
- if (NULL == pinfo) {
+ if (NULL == pinfo)
+ {
result = GNUNET_SYSERR;
GNUNET_SCHEDULER_shutdown ();
}
@@ -329,20 +335,21 @@ peer_information_cb (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Create member peer\n");
- if (0 == i) {
- /* connect to multicast service of member */
- op1 = GNUNET_TESTBED_service_connect (NULL, /* Closure
for operation */
- peers[1], /* The peer
whose service to connect to */
- "multicast", /* The name
of the service */
- service_connect1, /* callback to
call after a handle to service
- is opened */
- NULL, /* closure
for the above callback */
- multicast_ca1, /* callback to
call with peer's configuration;
- this should
open the needed service connection */
- multicast_da1, /* callback to be
called when closing the
- opened service
connection */
- NULL); /* closure
for the above two callbacks */
- }
+ if (0 == i)
+ {
+ /* connect to multicast service of member */
+ op1 = GNUNET_TESTBED_service_connect (NULL, /* Closure
for operation */
+ peers[1], /* The peer
whose service to connect to */
+ "multicast", /* The name
of the service */
+ service_connect1, /* callback to
call after a handle to service
+ is opened */
+ NULL, /* closure
for the above callback */
+ multicast_ca1, /* callback to
call with peer's configuration;
+ this should
open the needed service connection */
+ multicast_da1, /* callback to be
called when closing the
+ opened service
connection */
+ NULL); /* closure
for the above two callbacks */
+ }
}
/**
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (94c86ded6 -> 87798f3ef),
gnunet <=