|
a/src/sc2mpd.cpp |
|
b/src/sc2mpd.cpp |
|
... |
|
... |
264 |
|
264 |
|
265 |
TUint ttl = optionTtl.Value();
|
265 |
TUint ttl = optionTtl.Value();
|
266 |
Brhz uri(optionUri.Value());
|
266 |
Brhz uri(optionUri.Value());
|
267 |
|
267 |
|
268 |
string uconfigfile = (const char *)optionConfig.Value().Ptr();
|
268 |
string uconfigfile = (const char *)optionConfig.Value().Ptr();
|
|
|
269 |
|
|
|
270 |
bool cfspecified = true;
|
269 |
if (uconfigfile.empty())
|
271 |
if (uconfigfile.empty()) {
|
|
|
272 |
cfspecified = false;
|
270 |
uconfigfile = "/etc/upmpdcli.conf";
|
273 |
uconfigfile = "/etc/upmpdcli.conf";
|
|
|
274 |
}
|
271 |
ConfSimple config(uconfigfile.c_str(), 1, true);
|
275 |
ConfSimple config(uconfigfile.c_str(), 1, true);
|
272 |
if (!config.ok()) {
|
276 |
if (!config.ok()) {
|
273 |
cerr << "Could not open config: " << uconfigfile << endl;
|
277 |
cerr << "Could not open config: " << uconfigfile << endl;
|
|
|
278 |
if (cfspecified)
|
274 |
return 1;
|
279 |
return 1;
|
275 |
}
|
280 |
}
|
276 |
|
281 |
|
277 |
int port = 8888;
|
282 |
int port = 8888;
|
278 |
string value;
|
283 |
string value;
|
279 |
if (config.get("schttpport", value)) {
|
284 |
if (config.get("schttpport", value)) {
|