fixed compilation with libupnp >= 1.6.17

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5427 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-08-15 15:33:30 +00:00
parent 0e0458e40c
commit 5b73e36add

View File

@ -1477,7 +1477,11 @@ upnpEventSubscriptionExpired:
int TimeOut = 1801;
int ret = UpnpSubscribe(
upnpCP->m_UPnPClientHandle,
#if UPNP_VERSION >= 10617
UpnpString_get_String(es_event->PublisherUrl),
#else
es_event->PublisherUrl,
#endif
&TimeOut,
newSID);
if (ret != UPNP_E_SUCCESS) {
@ -1486,17 +1490,23 @@ upnpEventSubscriptionExpired:
msg, es_event->ErrCode, NULL, NULL);
} else {
ServiceMap::iterator it =
#if UPNP_VERSION >= 10617
upnpCP->m_ServiceMap.find(UpnpString_get_String(es_event->PublisherUrl));
#else
upnpCP->m_ServiceMap.find(es_event->PublisherUrl);
#endif
if (it != upnpCP->m_ServiceMap.end()) {
CUPnPService &service = *(it->second);
service.SetTimeout(TimeOut);
service.SetSID(newSID);
#ifdef UPNP_DEBUG
std::cerr << "CUPnPControlPoint::Callback() Re-subscribed to EventURL '" <<
#if UPNP_VERSION >= 10617
UpnpString_get_String(es_event->PublisherUrl) <<
#else
es_event->PublisherUrl <<
#endif
"' with SID == '" <<
newSID << "'." << std::endl;
#endif
// In principle, we should test to see if the
// service is the same. But here we only have one
// service, so...