Switch to unified view

a/src/upmpd.cxx b/src/upmpd.cxx
...
...
202
    string mpdpassword;
202
    string mpdpassword;
203
    string logfilename;
203
    string logfilename;
204
    int loglevel(Logger::LLINF);
204
    int loglevel(Logger::LLINF);
205
    string friendlyname(dfltFriendlyName);
205
    string friendlyname(dfltFriendlyName);
206
    bool ownqueue = true;
206
    bool ownqueue = true;
207
    bool openhome = true;
207
    bool enableAV = true;
208
    bool enableOH = true;
208
    bool ohmetapersist = true;
209
    bool ohmetapersist = true;
209
    string upmpdcliuser("upmpdcli");
210
    string upmpdcliuser("upmpdcli");
210
    string pidfilename("/var/run/upmpdcli.pid");
211
    string pidfilename("/var/run/upmpdcli.pid");
211
    string presentationhtml(DATADIR "/presentation.html");
212
    string presentationhtml(DATADIR "/presentation.html");
212
    string iface;
213
    string iface;
...
...
252
                op_flags |= OPT_O; 
253
                op_flags |= OPT_O; 
253
                if (argc < 2)  Usage();
254
                if (argc < 2)  Usage();
254
                const char *cp =  *(++argv);
255
                const char *cp =  *(++argv);
255
                if (*cp == '1' || *cp == 't' || *cp == 'T' || *cp == 'y' || 
256
                if (*cp == '1' || *cp == 't' || *cp == 'T' || *cp == 'y' || 
256
                    *cp == 'Y')
257
                    *cp == 'Y')
257
                    openhome = true;
258
                    enableOH = true;
258
                argc--; goto b1;
259
                argc--; goto b1;
259
            }
260
            }
260
            case 'P':   op_flags |= OPT_P; if (argc < 2)  Usage();
261
            case 'P':   op_flags |= OPT_P; if (argc < 2)  Usage();
261
                upport = atoi(*(++argv)); argc--; goto b1;
262
                upport = atoi(*(++argv)); argc--; goto b1;
262
            case 'p':   op_flags |= OPT_p; if (argc < 2)  Usage();
263
            case 'p':   op_flags |= OPT_p; if (argc < 2)  Usage();
...
...
298
        config.get("mpdpassword", mpdpassword);
299
        config.get("mpdpassword", mpdpassword);
299
        if (!(op_flags & OPT_q) && config.get("ownqueue", value)) {
300
        if (!(op_flags & OPT_q) && config.get("ownqueue", value)) {
300
            ownqueue = atoi(value.c_str()) != 0;
301
            ownqueue = atoi(value.c_str()) != 0;
301
        }
302
        }
302
        if (config.get("openhome", value)) {
303
        if (config.get("openhome", value)) {
303
            openhome = atoi(value.c_str()) != 0;
304
            enableOH = atoi(value.c_str()) != 0;
305
        }
306
        if (config.get("upnpav", value)) {
307
            enableAV = atoi(value.c_str()) != 0;
304
        }
308
        }
305
        if (config.get("ohmetapersist", value)) {
309
        if (config.get("ohmetapersist", value)) {
306
            ohmetapersist = atoi(value.c_str()) != 0;
310
            ohmetapersist = atoi(value.c_str()) != 0;
307
        }
311
        }
308
        config.get("iconpath", iconpath);
312
        config.get("iconpath", iconpath);
...
...
495
    string UUID = LibUPnP::makeDevUUID(friendlyname, hwaddr);
499
    string UUID = LibUPnP::makeDevUUID(friendlyname, hwaddr);
496
500
497
    // Initialize the data we serve through HTTP (device and service
501
    // Initialize the data we serve through HTTP (device and service
498
    // descriptions, icons, presentation page, etc.)
502
    // descriptions, icons, presentation page, etc.)
499
    unordered_map<string, VDirContent> files;
503
    unordered_map<string, VDirContent> files;
500
    if (!initHttpFs(files, datadir, UUID, friendlyname, openhome, iconpath,
504
    if (!initHttpFs(files, datadir, UUID, friendlyname, enableAV, enableOH, 
501
            presentationhtml)) {
505
                    iconpath, presentationhtml)) {
502
        exit(1);
506
        exit(1);
503
    }
507
    }
504
508
505
    if (ownqueue)
509
    if (ownqueue)
506
        opts.options |= UpMpd::upmpdOwnQueue;
510
        opts.options |= UpMpd::upmpdOwnQueue;
507
    if (openhome)
511
    if (enableOH)
508
        opts.options |= UpMpd::upmpdDoOH;
512
        opts.options |= UpMpd::upmpdDoOH;
509
    if (ohmetapersist)
513
    if (ohmetapersist)
510
        opts.options |= UpMpd::upmpdOhMetaPersist;
514
        opts.options |= UpMpd::upmpdOhMetaPersist;
511
    if (!g_sc2mpd_path.empty())
515
    if (!g_sc2mpd_path.empty())
512
        opts.options |= UpMpd::upmpdOhReceiver;
516
        opts.options |= UpMpd::upmpdOhReceiver;