From 7e9daf73d401e3afd42f68ed20ff3d0e2e0a6a0a Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 13 Apr 2014 13:16:28 +0200 Subject: [PATCH] Allow configuration directory and node names to be specified on the command line. --- meshlink-sample/meshlinkapp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meshlink-sample/meshlinkapp.c b/meshlink-sample/meshlinkapp.c index 0b494599..ff9bad1e 100644 --- a/meshlink-sample/meshlinkapp.c +++ b/meshlink-sample/meshlinkapp.c @@ -2,12 +2,12 @@ int main(int argc , char **argv){ -char *confbase = "/tmp/meshlink/"; -char *name = "test"; +char *confbase = argc > 1 ? argv[1] : "/tmp/meshlink/"; +char *name = argc > 2 ? argv[2] : "foo"; debug_level = 5; node_t* remotenode = new_node(); -char *remotename = "ml"; +char *remotename = argc > 3 ? argv[3] : "bar"; //TODO: change this, calling a function that returns node_t remotenode->name = malloc(16); -- 2.39.5