|
a/libupnpp/control/service.cxx |
|
b/libupnpp/control/service.cxx |
|
... |
|
... |
317 |
{
|
317 |
{
|
318 |
LOGDEB1("Service::subscribe" << endl);
|
318 |
LOGDEB1("Service::subscribe" << endl);
|
319 |
LibUPnP* lib = LibUPnP::getLibUPnP();
|
319 |
LibUPnP* lib = LibUPnP::getLibUPnP();
|
320 |
if (lib == 0) {
|
320 |
if (lib == 0) {
|
321 |
LOGINF("Service::subscribe: no lib" << endl);
|
321 |
LOGINF("Service::subscribe: no lib" << endl);
|
322 |
return UPNP_E_OUTOF_MEMORY;
|
322 |
return false;
|
323 |
}
|
323 |
}
|
324 |
int timeout = 1800;
|
324 |
int timeout = 1800;
|
325 |
int ret = UpnpSubscribe(lib->getclh(), m->eventURL.c_str(),
|
325 |
int ret = UpnpSubscribe(lib->getclh(), m->eventURL.c_str(),
|
326 |
&timeout, m->SID);
|
326 |
&timeout, m->SID);
|
327 |
if (ret != UPNP_E_SUCCESS) {
|
327 |
if (ret != UPNP_E_SUCCESS) {
|
|
... |
|
... |
337 |
{
|
337 |
{
|
338 |
LOGDEB1("Service::unSubscribe" << endl);
|
338 |
LOGDEB1("Service::unSubscribe" << endl);
|
339 |
LibUPnP* lib = LibUPnP::getLibUPnP();
|
339 |
LibUPnP* lib = LibUPnP::getLibUPnP();
|
340 |
if (lib == 0) {
|
340 |
if (lib == 0) {
|
341 |
LOGINF("Service::unSubscribe: no lib" << endl);
|
341 |
LOGINF("Service::unSubscribe: no lib" << endl);
|
342 |
return UPNP_E_OUTOF_MEMORY;
|
342 |
return false;
|
343 |
}
|
343 |
}
|
344 |
if (m->SID[0]) {
|
344 |
if (m->SID[0]) {
|
345 |
int ret = UpnpUnSubscribe(lib->getclh(), m->SID);
|
345 |
int ret = UpnpUnSubscribe(lib->getclh(), m->SID);
|
346 |
if (ret != UPNP_E_SUCCESS) {
|
346 |
if (ret != UPNP_E_SUCCESS) {
|
347 |
LOGERR("Service:unSubscribe: failed: " << ret << " : " <<
|
347 |
LOGERR("Service:unSubscribe: failed: " << ret << " : " <<
|