|
a/src/main.cxx |
|
b/src/main.cxx |
|
... |
|
... |
159 |
static UpnpDevice *dev;
|
159 |
static UpnpDevice *dev;
|
160 |
|
160 |
|
161 |
string g_datadir(DATADIR "/");
|
161 |
string g_datadir(DATADIR "/");
|
162 |
|
162 |
|
163 |
// Global
|
163 |
// Global
|
164 |
string g_configfilename(CONFIGDIR "/upmpdcli.conf");
|
164 |
string g_configfilename;
|
165 |
std::mutex g_configlock;
|
165 |
std::mutex g_configlock;
|
166 |
ConfSimple *g_config;
|
166 |
ConfSimple *g_config;
|
167 |
|
167 |
|
168 |
static void onsig(int)
|
168 |
static void onsig(int)
|
169 |
{
|
169 |
{
|
|
... |
|
... |
405 |
inprocessms = false;
|
405 |
inprocessms = false;
|
406 |
msonly = false;
|
406 |
msonly = false;
|
407 |
break;
|
407 |
break;
|
408 |
}
|
408 |
}
|
409 |
}
|
409 |
}
|
|
|
410 |
} else {
|
|
|
411 |
// g_configfilename is empty. Create an empty config anyway
|
|
|
412 |
g_config = new ConfSimple(string(), 1, true);
|
|
|
413 |
if (!g_config || !g_config->ok()) {
|
|
|
414 |
cerr << "Could not create empty config\n";
|
|
|
415 |
return 1;
|
|
|
416 |
}
|
410 |
}
|
417 |
}
|
411 |
|
418 |
|
412 |
if (Logger::getTheLog(logfilename) == 0) {
|
419 |
if (Logger::getTheLog(logfilename) == 0) {
|
413 |
cerr << "Can't initialize log" << endl;
|
420 |
cerr << "Can't initialize log" << endl;
|
414 |
return 1;
|
421 |
return 1;
|