X-Git-Url: https://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnames.c;h=a631ad97e7fcde60c0216e66d7324bf55952db72;hb=9699f08afc6420d2bdac1063ea6789b585aaf42e;hp=cc72a112318610833163930c56b544f1075be452;hpb=3847b78ba5900fe4311e9ef62474e32e1a6750e5;p=tinc diff --git a/src/names.c b/src/names.c index cc72a112..a631ad97 100644 --- a/src/names.c +++ b/src/names.c @@ -42,6 +42,9 @@ void make_names(void) { DWORD len = sizeof installdir; #endif + if(netname && confbase) + logger(DEBUG_ALWAYS, LOG_INFO, "Both netname and configuration directory given, using the latter..."); + if(netname) xasprintf(&identname, "tinc.%s", netname); else @@ -84,13 +87,10 @@ void make_names(void) { strcpy(unixsocketname + len, ".socket"); } - if(netname) { - if(!confbase) + if(!confbase) { + if(netname) xasprintf(&confbase, CONFDIR SLASH "tinc" SLASH "%s", netname); else - logger(DEBUG_ALWAYS, LOG_INFO, "Both netname and configuration directory given, using the latter..."); - } else { - if(!confbase) xasprintf(&confbase, CONFDIR SLASH "tinc"); } }