From: Saverio Proto Date: Fri, 8 Aug 2014 13:17:37 +0000 (+0000) Subject: example manynodes fixed to use meshlink_join X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=7c3d65e8f41843be884e88506c313f7a1e432b00;p=meshlink example manynodes fixed to use meshlink_join --- 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");