Switch to unified view

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