From 7c3d65e8f41843be884e88506c313f7a1e432b00 Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Fri, 8 Aug 2014 13:17:37 +0000 Subject: [PATCH] example manynodes fixed to use meshlink_join --- examples/manynodes.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/manynodes.c b/examples/manynodes.c index 64a2657b..991d5ba6 100644 --- a/examples/manynodes.c +++ b/examples/manynodes.c @@ -56,11 +56,13 @@ static void parse_command(char *buf) { fprintf(stderr, "/join requires an argument!\n"); return; } - + meshlink_stop(mesh[0]); if(!meshlink_join(mesh[0], arg)) fprintf(stderr, "Could not join using invitation: %s\n", meshlink_strerror(meshlink_errno)); - else + else { fprintf(stderr, "Invitation accepted!\n"); + meshlink_start(mesh[0]); + } } else if(!strcasecmp(buf, "kick")) { if(!arg) { fprintf(stderr, "/kick requires an argument!\n"); -- 2.39.5