From: Saverio Proto Date: Mon, 1 Sep 2014 06:31:09 +0000 (+0200) Subject: manynodes: export the graph always from node 0 X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=0c8aafd0f1d6ed254048d1d011563fb64a462a2f;p=meshlink manynodes: export the graph always from node 0 --- diff --git a/examples/manynodes.c b/examples/manynodes.c index d158e5b9..9e693ebf 100644 --- a/examples/manynodes.c +++ b/examples/manynodes.c @@ -95,7 +95,7 @@ static bool exportmeshgraph(const char* path) return false; } - if(!devtool_export_json_all_edges_state(mesh[nodeindex], stream)) + if(!devtool_export_json_all_edges_state(mesh[0], stream)) { fclose(stream); fprintf(stderr, "could not export graph\n"); @@ -365,7 +365,7 @@ int main(int argc, char *argv[]) { mesh = calloc(n, sizeof *mesh); - meshlink_set_log_cb(NULL, MESHLINK_WARNING, log_message); + meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_message); mkdir(basebase, 0750); char filename[PATH_MAX]; @@ -380,7 +380,7 @@ int main(int argc, char *argv[]) { else { mesh[i] = meshlink_open(filename, nodename, "manynodes", DEV_CLASS_PORTABLE); } - meshlink_set_log_cb(mesh[i], MESHLINK_WARNING, log_message); + meshlink_set_log_cb(mesh[i], MESHLINK_DEBUG, log_message); if(!mesh[i]) { fprintf(stderr, "errno is: %d\n", meshlink_errno); fprintf(stderr, "Could not open %s: %s\n", filename, meshlink_strerror(meshlink_errno));