From 64f243ffc7f01bfa3a0980fb0f92106224676f06 Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Thu, 28 Aug 2014 15:17:15 +0200 Subject: [PATCH] manynodes: implement stop command --- examples/manynodes.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/manynodes.c b/examples/manynodes.c index 7b23fc51..16d25ddc 100644 --- a/examples/manynodes.c +++ b/examples/manynodes.c @@ -257,7 +257,8 @@ static void parse_command(char *buf) { } nodeindex = atoi(arg); printf("Index is now %d\n",nodeindex); - + } else if(!strcasecmp(buf, "stop")) { + meshlink_stop(mesh[nodeindex]); } else if(!strcasecmp(buf, "quit")) { printf("Bye!\n"); fclose(stdin); @@ -273,6 +274,7 @@ static void parse_command(char *buf) { "/eg Export graph as json file.\n" "/test Test functionality sending some data to all nodes\n" "/select Select the active node running the user commands\n" + "/stop Call meshlink_stop, use /select first to select which node to stop\n" "/quit Exit this program.\n" ); } else { -- 2.39.5