Switch to unified view

a/libupnpp/control/discovery.cxx b/libupnpp/control/discovery.cxx
...
...
245
                // <<  " description: " << endl << d.device.dump() << endl);
245
                // <<  " description: " << endl << d.device.dump() << endl);
246
                o_pool.m_devices[tsk->deviceId] = d;
246
                o_pool.m_devices[tsk->deviceId] = d;
247
            }
247
            }
248
            {
248
            {
249
                PTMutexLocker lock(o_callbacks_mutex);
249
                PTMutexLocker lock(o_callbacks_mutex);
250
                for (auto& cb: o_callbacks) {
250
                for (auto cbp = o_callbacks.begin(); 
251
                     cbp != o_callbacks.end(); cbp++) {
251
                    cb(d.device, UPnPServiceDesc());
252
                    (*cbp)(d.device, UPnPServiceDesc());
252
                }
253
                }
253
            }
254
            }
254
        }
255
        }
255
        delete tsk;
256
        delete tsk;
256
    }
257
    }
...
...
370
    // Has locking, do it before our own lock
371
    // Has locking, do it before our own lock
371
    expireDevices();
372
    expireDevices();
372
373
373
    PTMutexLocker lock(o_pool.m_mutex);
374
    PTMutexLocker lock(o_pool.m_mutex);
374
375
375
    for (auto& dde : o_pool.m_devices) {
376
    for (auto it = o_pool.m_devices.begin(); 
376
        for (auto& service : dde.second.device.services) {
377
         it != o_pool.m_devices.end(); it++) {
378
        for (auto it1 = it->second.device.services.begin();
379
             it1 != it->second.device.services.end(); it1++) {
377
            if (!visit(dde.second.device, service))
380
            if (!visit(it->second.device, *it1))
378
                return false;
381
                return false;
379
        }
382
        }
380
    }
383
    }
381
    return true;
384
    return true;
382
}
385
}
...
...
406
    UPnPP::timespec_addnanos(&wkuptime, nanos);
409
    UPnPP::timespec_addnanos(&wkuptime, nanos);
407
    do {
410
    do {
408
        PTMutexLocker lock(devWaitLock);
411
        PTMutexLocker lock(devWaitLock);
409
        {
412
        {
410
            PTMutexLocker lock(o_pool.m_mutex);
413
            PTMutexLocker lock(o_pool.m_mutex);
411
            for (auto& dde : o_pool.m_devices) {
414
            for (auto it = o_pool.m_devices.begin(); 
415
                 it != o_pool.m_devices.end(); it++) {
412
                if (!cmp(dde.second.device, value)) {
416
                if (!cmp(it->second.device, value)) {
413
                    ddesc = dde.second.device;
417
                    ddesc = it->second.device;
414
                    return true;
418
                    return true;
415
                }
419
                }
416
            }
420
            }
417
        }
421
        }
418
422