- return true;
-}
-
-/*
- Set all files and paths according to netname
-*/
-static void make_names(void) {
-#ifdef HAVE_MINGW
- HKEY key;
- char installdir[1024] = "";
- long len = sizeof installdir;
-#endif
-
- if(netname)
- xasprintf(&identname, "tinc.%s", netname);
- else
- identname = xstrdup("tinc");
-
-#ifdef HAVE_MINGW
- if(!RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\tinc", 0, KEY_READ, &key)) {
- if(!RegQueryValueEx(key, NULL, 0, 0, installdir, &len)) {
- if(!logfilename)
- xasprintf(&logfilename, "%s" SLASH "log" SLASH "%s.log", identname);
- if(!confbase) {
- if(netname)
- xasprintf(&confbase, "%s" SLASH "%s", installdir, netname);
- else
- xasprintf(&confbase, "%s", installdir);
- }
- if(!pidfilename)
- xasprintf(&pidfilename, "%s" SLASH "pid", confbase);
- }
- RegCloseKey(key);
- if(*installdir)
- return;
- }
-#endif
-
- if(!logfilename)
- xasprintf(&logfilename, LOCALSTATEDIR SLASH "log" SLASH "%s.log", identname);
-
- if(!pidfilename)
- xasprintf(&pidfilename, LOCALSTATEDIR SLASH "run" SLASH "%s.pid", identname);