From 5b73e36add9edac8ca9a34cbf3563cf8cb95eb39 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 15 Aug 2012 15:33:30 +0000 Subject: [PATCH] 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 --- libretroshare/src/upnp/UPnPBase.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/upnp/UPnPBase.cpp b/libretroshare/src/upnp/UPnPBase.cpp index 77bdf9073..4e8526c89 100644 --- a/libretroshare/src/upnp/UPnPBase.cpp +++ b/libretroshare/src/upnp/UPnPBase.cpp @@ -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...