Fix warning "Both netname and configuration directory given" on Windows.
This commit is contained in:
parent
633b7cbb45
commit
918067f117
1 changed files with 5 additions and 5 deletions
10
src/names.c
10
src/names.c
|
@ -42,6 +42,9 @@ void make_names(void) {
|
||||||
DWORD len = sizeof installdir;
|
DWORD len = sizeof installdir;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if(netname && confbase)
|
||||||
|
logger(DEBUG_ALWAYS, LOG_INFO, "Both netname and configuration directory given, using the latter...");
|
||||||
|
|
||||||
if(netname)
|
if(netname)
|
||||||
xasprintf(&identname, "tinc.%s", netname);
|
xasprintf(&identname, "tinc.%s", netname);
|
||||||
else
|
else
|
||||||
|
@ -84,13 +87,10 @@ void make_names(void) {
|
||||||
strcpy(unixsocketname + len, ".socket");
|
strcpy(unixsocketname + len, ".socket");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(netname) {
|
if(!confbase) {
|
||||||
if(!confbase)
|
if(netname)
|
||||||
xasprintf(&confbase, CONFDIR SLASH "tinc" SLASH "%s", netname);
|
xasprintf(&confbase, CONFDIR SLASH "tinc" SLASH "%s", netname);
|
||||||
else
|
else
|
||||||
logger(DEBUG_ALWAYS, LOG_INFO, "Both netname and configuration directory given, using the latter...");
|
|
||||||
} else {
|
|
||||||
if(!confbase)
|
|
||||||
xasprintf(&confbase, CONFDIR SLASH "tinc");
|
xasprintf(&confbase, CONFDIR SLASH "tinc");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue