Switch to unified view

a/libupnpp/device.cxx b/libupnpp/device.cxx
...
...
267
267
268
void UpnpDevice::notifyEvent(const string& serviceId,
268
void UpnpDevice::notifyEvent(const string& serviceId,
269
                             const vector<string>& names, 
269
                             const vector<string>& names, 
270
                             const vector<string>& values)
270
                             const vector<string>& values)
271
{
271
{
272
    LOGDEB("UpnpDevice::notifyEvent: " 
272
    LOGDEB("UpnpDevice::notifyEvent " << serviceId << " " <<
273
           << (names.empty()?"Empty names??":names[0]) << endl);
273
           (names.empty()?"Empty names??":names[0]) << endl);
274
    if (names.empty())
274
    if (names.empty())
275
        return;
275
        return;
276
    vector<const char *> cnames, cvalues;
276
    vector<const char *> cnames, cvalues;
277
    vector<string> qvalues;
277
    vector<string> qvalues;
278
    vectorstoargslists(names, values, qvalues, cnames, cvalues);
278
    vectorstoargslists(names, values, qvalues, cnames, cvalues);
...
...
306
// only if changed data exists. Every 3 S we generate an artificial
306
// only if changed data exists. Every 3 S we generate an artificial
307
// event with all the current state.
307
// event with all the current state.
308
void UpnpDevice::eventloop()
308
void UpnpDevice::eventloop()
309
{
309
{
310
    int count = 0;
310
    int count = 0;
311
    const int loopwait_ms = 500; // Polling mpd every 1/2 S
311
    const int loopwait_ms = 1000; // Polling mpd every 1 S
312
    const int nloopstofull = 10; // Full state every 5 S
312
    const int nloopstofull = 10;  // Full state every 10 S
313
    struct timespec wkuptime, earlytime;
313
    struct timespec wkuptime, earlytime;
314
    bool didearly = false;
314
    bool didearly = false;
315
315
316
    for (;;) {
316
    for (;;) {
317
        clock_gettime(CLOCK_REALTIME, &wkuptime);
317
        clock_gettime(CLOCK_REALTIME, &wkuptime);