Switch to unified view

a/libupnpp/device/device.cxx b/libupnpp/device/device.cxx
...
...
115
    if ((ret = m_lib->setupWebServer(description, &m_dvh)) != 0) {
115
    if ((ret = m_lib->setupWebServer(description, &m_dvh)) != 0) {
116
        LOGFAT("UpnpDevice: libupnp can't start service. Err " << ret << endl);
116
        LOGFAT("UpnpDevice: libupnp can't start service. Err " << ret << endl);
117
    }
117
    }
118
118
119
    if ((ret = UpnpSendAdvertisement(m_dvh, expiretime)) != 0) {
119
    if ((ret = UpnpSendAdvertisement(m_dvh, expiretime)) != 0) {
120
        LOGERR("UpnpDevice: UpnpSendAdvertisement error: " << ret << endl);
120
        LOGERR(m_lib->errAsString("UpnpDevice: UpnpSendAdvertisement", ret)
121
               << endl);
121
    }
122
    }
122
}
123
}
123
124
124
UpnpDevice::~UpnpDevice()
125
UpnpDevice::~UpnpDevice()
125
{
126
{
...
...
273
        int ret = 
274
        int ret = 
274
            UpnpAcceptSubscription(m_dvh, act->UDN, act->ServiceId,
275
            UpnpAcceptSubscription(m_dvh, act->UDN, act->ServiceId,
275
                                   &cnames[0], &cvalues[0],
276
                                   &cnames[0], &cvalues[0],
276
                                   int(cnames.size()), act->Sid);
277
                                   int(cnames.size()), act->Sid);
277
        if (ret != UPNP_E_SUCCESS) {
278
        if (ret != UPNP_E_SUCCESS) {
279
            LOGERR(m_lib->errAsString(
278
            LOGERR("UpnpDevice::callBack: UpnpAcceptSubscription failed: " 
280
                       "UpnpDevice::callBack: UpnpAcceptSubscription", ret) <<
279
                   << ret << endl);
281
                   endl);
280
        }
282
        }
281
283
282
        return ret;
284
        return ret;
283
    }
285
    }
284
    break;
286
    break;
...
...
309
311
310
void UpnpDevice::notifyEvent(const string& serviceId,
312
void UpnpDevice::notifyEvent(const string& serviceId,
311
                             const vector<string>& names, 
313
                             const vector<string>& names, 
312
                             const vector<string>& values)
314
                             const vector<string>& values)
313
{
315
{
314
    LOGDEB("UpnpDevice::notifyEvent " << serviceId << " " <<
316
    LOGDEB1("UpnpDevice::notifyEvent " << serviceId << " " <<
315
           (names.empty()?"Empty names??":names[0]) << endl);
317
           (names.empty()?"Empty names??":names[0]) << endl);
316
    if (names.empty())
318
    if (names.empty())
317
        return;
319
        return;
318
    vector<const char *> cnames, cvalues;
320
    vector<const char *> cnames, cvalues;
319
    vector<string> qvalues;
321
    vector<string> qvalues;
...
...
321
323
322
    int ret = UpnpNotify(m_dvh, m_deviceId.c_str(), 
324
    int ret = UpnpNotify(m_dvh, m_deviceId.c_str(), 
323
                         serviceId.c_str(), &cnames[0], &cvalues[0],
325
                         serviceId.c_str(), &cnames[0], &cvalues[0],
324
                         int(cnames.size()));
326
                         int(cnames.size()));
325
    if (ret != UPNP_E_SUCCESS) {
327
    if (ret != UPNP_E_SUCCESS) {
326
        LOGERR("UpnpDevice::notifyEvent: UpnpNotify failed: " << ret << endl);
328
        LOGERR(m_lib->errAsString("UpnpDevice::notifyEvent", ret) << endl);
327
    }
329
    }
328
}
330
}
329
331
330
int timespec_diffms(const struct timespec& old, const struct timespec& recent)
332
int timespec_diffms(const struct timespec& old, const struct timespec& recent)
331
{
333
{