X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fmeshlink.c;h=65a82c97f192f65b48fdd6a125c5d7d7c36c42b7;hb=ba799a101d57c55d4cbf602511aa24c32a5b735e;hp=0ecab432912b4dc9c384700aea5043ac9160169c;hpb=2200060c4eaadae36b8150aa33b0db7c0d74722f;p=meshlink diff --git a/src/meshlink.c b/src/meshlink.c index 0ecab432..65a82c97 100644 --- a/src/meshlink.c +++ b/src/meshlink.c @@ -1726,7 +1726,17 @@ static void __attribute__((destructor)) meshlink_exit(void) { int weight_from_dclass(dclass_t dclass) { - if(dclass == PORTABLE) + switch(dclass) + { + case BACKBONE: + return 1; + + case STATIONARY: return 3; - return 1; + + case PORTABLE: + return 6; + } + + return 9; }