From a1ca2b23296707172f0e315a1edc186eaccf5551 Mon Sep 17 00:00:00 2001 From: Saverio Proto Date: Thu, 28 Aug 2014 15:18:00 +0200 Subject: [PATCH] manynodes: add few backbone nodes and many portable nodes to make tests --- examples/manynodes.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/manynodes.c b/examples/manynodes.c index 16d25ddc..d158e5b9 100644 --- a/examples/manynodes.c +++ b/examples/manynodes.c @@ -374,7 +374,12 @@ int main(int argc, char *argv[]) { snprintf(nodename, sizeof nodename, "%snode%d", namesprefix,i); snprintf(filename, sizeof filename, "%s/%s", basebase, nodename); bool itsnew = access(filename, R_OK); - mesh[i] = meshlink_open(filename, nodename, "manynodes", i%_DEV_CLASS_MAX); + if (n/(i+1) > n/4) { + mesh[i] = meshlink_open(filename, nodename, "manynodes", DEV_CLASS_BACKBONE); + } + else { + mesh[i] = meshlink_open(filename, nodename, "manynodes", DEV_CLASS_PORTABLE); + } meshlink_set_log_cb(mesh[i], MESHLINK_WARNING, log_message); if(!mesh[i]) { fprintf(stderr, "errno is: %d\n", meshlink_errno); -- 2.39.5