]> git.meshlink.io Git - meshlink/commitdiff
Start the mesh after joining with invitation
authorSaverio Proto <zioproto@gmail.com>
Sat, 7 Jun 2014 11:20:53 +0000 (13:20 +0200)
committerSaverio Proto <zioproto@gmail.com>
Sat, 7 Jun 2014 11:20:53 +0000 (13:20 +0200)
examples/chat.c

index 7859ae4c05239fce613f3cf0f27a107517f16c68..887d1440f0e6b6af095bad45ab0971d801cd363e 100644 (file)
@@ -56,8 +56,10 @@ static void parse_command(meshlink_handle_t *mesh, char *buf) {
 
                if(!meshlink_join(mesh, arg))
                        fprintf(stderr, "Could not join using invitation: %s\n", mesh->errstr);
-               else
+               else {
                        fprintf(stderr, "Invitation accepted!\n");
+                       meshlink_start(mesh);
+               }
        } else if(!strcasecmp(buf, "kick")) {
                if(!arg) {
                        fprintf(stderr, "/kick requires an argument!\n");