upnp: cleanup. fix logs
Change-Id: Iab2f809f50e44bf302a8b3c7aeb3f1c3517a4595
diff --git a/src/upnp/protocol/pupnp/pupnp.cpp b/src/upnp/protocol/pupnp/pupnp.cpp
index 205b19f..b902e00 100644
--- a/src/upnp/protocol/pupnp/pupnp.cpp
+++ b/src/upnp/protocol/pupnp/pupnp.cpp
@@ -771,9 +771,9 @@
// Run a separate thread to prevent blocking this thread
// if the IGD HTTP server is not responsive.
- dht::ThreadPool::io().run([w = weak(), igdLocationUrl] {
+ dht::ThreadPool::io().run([w = weak(), url=igdLocationUrl] {
if (auto upnpThis = w.lock()) {
- upnpThis->downLoadIgdDescription(igdLocationUrl);
+ upnpThis->downLoadIgdDescription(url);
}
});
}
@@ -781,6 +781,7 @@
void
PUPnP::downLoadIgdDescription(const std::string& locationUrl)
{
+ if(logger_) logger_->debug("PUPnP: downLoadIgdDescription {}", locationUrl);
IXML_Document* doc_container_ptr = nullptr;
int upnp_err = UpnpDownloadXmlDoc(locationUrl.c_str(), &doc_container_ptr);