|
a/upmpd/upmpd.cxx |
|
b/upmpd/upmpd.cxx |
|
... |
|
... |
477 |
LOGFAT("Lib init failed: " <<
|
477 |
LOGFAT("Lib init failed: " <<
|
478 |
mylib->errAsString("main", mylib->getInitError()) << endl);
|
478 |
mylib->errAsString("main", mylib->getInitError()) << endl);
|
479 |
return 1;
|
479 |
return 1;
|
480 |
}
|
480 |
}
|
481 |
|
481 |
|
482 |
//string upnplogfilename("/tmp/upmpdcli_libupnp.log");
|
482 |
if ((cp = getenv("UPMPDCLI_UPNPLOGFILENAME"))) {
|
483 |
//mylib->setLogFileName(upnplogfilename, LibUPnP::LogLevelDebug);
|
483 |
char *cp1 = getenv("UPMPDCLI_UPNPLOGLEVEL");
|
|
|
484 |
int loglevel = LibUPnP::LogLevelNone;
|
|
|
485 |
if (cp1) {
|
|
|
486 |
loglevel = atoi(cp1);
|
|
|
487 |
}
|
|
|
488 |
loglevel = loglevel < 0 ? 0: loglevel;
|
|
|
489 |
loglevel = loglevel > int(LibUPnP::LogLevelDebug) ?
|
|
|
490 |
int(LibUPnP::LogLevelDebug) : loglevel;
|
|
|
491 |
|
|
|
492 |
if (loglevel != LibUPnP::LogLevelNone) {
|
|
|
493 |
mylib->setLogFileName(cp, LibUPnP::LogLevel(loglevel));
|
|
|
494 |
}
|
|
|
495 |
}
|
484 |
|
496 |
|
485 |
// Create unique ID
|
497 |
// Create unique ID
|
486 |
string UUID = LibUPnP::makeDevUUID(friendlyname, hwaddr);
|
498 |
string UUID = LibUPnP::makeDevUUID(friendlyname, hwaddr);
|
487 |
|
499 |
|
488 |
// Read our XML data to make it available from the virtual directory
|
500 |
// Read our XML data to make it available from the virtual directory
|