Switch to unified view

a/src/upmpd.cxx b/src/upmpd.cxx
...
...
273
273
274
    UpMpd::Options opts;
274
    UpMpd::Options opts;
275
275
276
    string iconpath;
276
    string iconpath;
277
    string cachedir;
277
    string cachedir;
278
    string onstart;
279
    string onstop;
278
    if (!g_configfilename.empty()) {
280
    if (!g_configfilename.empty()) {
279
        ConfSimple config(g_configfilename.c_str(), 1, true);
281
        ConfSimple config(g_configfilename.c_str(), 1, true);
280
        if (!config.ok()) {
282
        if (!config.ok()) {
281
            cerr << "Could not open config: " << g_configfilename << endl;
283
            cerr << "Could not open config: " << g_configfilename << endl;
282
            return 1;
284
            return 1;
...
...
304
            ohmetapersist = atoi(value.c_str()) != 0;
306
            ohmetapersist = atoi(value.c_str()) != 0;
305
        }
307
        }
306
        config.get("iconpath", iconpath);
308
        config.get("iconpath", iconpath);
307
        config.get("presentationhtml", presentationhtml);
309
        config.get("presentationhtml", presentationhtml);
308
        config.get("cachedir", cachedir);
310
        config.get("cachedir", cachedir);
311
        config.get("onstart", onstart);
312
        config.get("onstop", onstop);
309
        if (!(op_flags & OPT_i)) {
313
        if (!(op_flags & OPT_i)) {
310
            config.get("upnpiface", iface);
314
            config.get("upnpiface", iface);
311
            if (iface.empty()) {
315
            if (iface.empty()) {
312
                config.get("upnpip", upnpip);
316
                config.get("upnpip", upnpip);
313
            }
317
            }
...
...
433
437
434
    // Initialize MPD client object. Retry until it works or power fail.
438
    // Initialize MPD client object. Retry until it works or power fail.
435
    MPDCli *mpdclip = 0;
439
    MPDCli *mpdclip = 0;
436
    int mpdretrysecs = 2;
440
    int mpdretrysecs = 2;
437
    for (;;) {
441
    for (;;) {
438
        mpdclip = new MPDCli(mpdhost, mpdport, mpdpassword);
442
        mpdclip = new MPDCli(mpdhost, mpdport, mpdpassword, onstart, onstop);
439
        if (mpdclip == 0) {
443
        if (mpdclip == 0) {
440
            LOGFAT("Can't allocate MPD client object" << endl);
444
            LOGFAT("Can't allocate MPD client object" << endl);
441
            return 1;
445
            return 1;
442
        }
446
        }
443
        if (!mpdclip->ok()) {
447
        if (!mpdclip->ok()) {