projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
633b7cb
)
Fix warning "Both netname and configuration directory given" on Windows.
author
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 15 Jul 2013 12:48:43 +0000
(14:48 +0200)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 15 Jul 2013 12:48:43 +0000
(14:48 +0200)
src/names.c
patch
|
blob
|
history
diff --git
a/src/names.c
b/src/names.c
index
cc72a11
..
a631ad9
100644
(file)
--- a/
src/names.c
+++ b/
src/names.c
@@
-42,6
+42,9
@@
void make_names(void) {
DWORD len = sizeof installdir;
#endif
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
if(netname)
xasprintf(&identname, "tinc.%s", netname);
else
@@
-84,13
+87,10
@@
void make_names(void) {
strcpy(unixsocketname + len, ".socket");
}
strcpy(unixsocketname + len, ".socket");
}
- if(
netnam
e) {
- if(
!confbas
e)
+ if(
!confbas
e) {
+ if(
netnam
e)
xasprintf(&confbase, CONFDIR SLASH "tinc" SLASH "%s", netname);
else
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");
}
}
xasprintf(&confbase, CONFDIR SLASH "tinc");
}
}