|
a/upmpd/upmpd.cxx |
|
b/upmpd/upmpd.cxx |
|
... |
|
... |
46 |
#include "ohproduct.hxx"
|
46 |
#include "ohproduct.hxx"
|
47 |
#include "ohinfo.hxx"
|
47 |
#include "ohinfo.hxx"
|
48 |
#include "ohtime.hxx"
|
48 |
#include "ohtime.hxx"
|
49 |
#include "ohvolume.hxx"
|
49 |
#include "ohvolume.hxx"
|
50 |
#include "ohplaylist.hxx"
|
50 |
#include "ohplaylist.hxx"
|
|
|
51 |
|
|
|
52 |
using namespace UPnPP;
|
51 |
|
53 |
|
52 |
static const string dfltFriendlyName("UpMpd");
|
54 |
static const string dfltFriendlyName("UpMpd");
|
53 |
string upmpdProtocolInfo;
|
55 |
string upmpdProtocolInfo;
|
54 |
|
56 |
|
55 |
static UpnpDevice *dev;
|
57 |
static UpnpDevice *dev;
|
|
... |
|
... |
221 |
{
|
223 |
{
|
222 |
string mpdhost("localhost");
|
224 |
string mpdhost("localhost");
|
223 |
int mpdport = 6600;
|
225 |
int mpdport = 6600;
|
224 |
string mpdpassword;
|
226 |
string mpdpassword;
|
225 |
string logfilename;
|
227 |
string logfilename;
|
226 |
int loglevel(upnppdebug::Logger::LLINF);
|
228 |
int loglevel(Logger::LLINF);
|
227 |
string configfile;
|
229 |
string configfile;
|
228 |
string friendlyname(dfltFriendlyName);
|
230 |
string friendlyname(dfltFriendlyName);
|
229 |
bool ownqueue = true;
|
231 |
bool ownqueue = true;
|
230 |
bool openhome = true;
|
232 |
bool openhome = true;
|
231 |
bool ohmetapersist = true;
|
233 |
bool ohmetapersist = true;
|
|
... |
|
... |
330 |
if (!(op_flags & OPT_P) && config.get("upnpport", value)) {
|
332 |
if (!(op_flags & OPT_P) && config.get("upnpport", value)) {
|
331 |
upport = atoi(value.c_str());
|
333 |
upport = atoi(value.c_str());
|
332 |
}
|
334 |
}
|
333 |
}
|
335 |
}
|
334 |
|
336 |
|
335 |
if (upnppdebug::Logger::getTheLog(logfilename) == 0) {
|
337 |
if (Logger::getTheLog(logfilename) == 0) {
|
336 |
cerr << "Can't initialize log" << endl;
|
338 |
cerr << "Can't initialize log" << endl;
|
337 |
return 1;
|
339 |
return 1;
|
338 |
}
|
340 |
}
|
339 |
upnppdebug::Logger::getTheLog("")->setLogLevel(upnppdebug::Logger::LogLevel(loglevel));
|
341 |
Logger::getTheLog("")->setLogLevel(Logger::LogLevel(loglevel));
|
340 |
|
342 |
|
341 |
Pidfile pidfile(pidfilename);
|
343 |
Pidfile pidfile(pidfilename);
|
342 |
|
344 |
|
343 |
string cachedir;
|
345 |
string cachedir;
|
344 |
|
346 |
|