diff --git a/include/upnp/upnp_context.h b/include/upnp/upnp_context.h index bd1cc2bdc15a56cf93d333cb1a380020aaa2cf76..a486eb5fbe74d2233635c99fe0c2ea71362051dc 100644 --- a/include/upnp/upnp_context.h +++ b/include/upnp/upnp_context.h @@ -105,7 +105,7 @@ private: }; public: - UPnPContext(std::shared_ptr<asio::io_context> ctx, std::shared_ptr<dht::log::Logger> logger); + UPnPContext(const std::shared_ptr<asio::io_context>& ctx, const std::shared_ptr<dht::log::Logger>& logger); ~UPnPContext(); // Retrieve the UPnPContext singleton. diff --git a/src/upnp/upnp_context.cpp b/src/upnp/upnp_context.cpp index 93af97183ee91887f010da4fd8e068a4096869a2..6b1ff90861c75b0f9c287bf60bb7dff7f455f4c8 100644 --- a/src/upnp/upnp_context.cpp +++ b/src/upnp/upnp_context.cpp @@ -36,7 +36,7 @@ constexpr static uint16_t UPNP_TCP_PORT_MAX {UPNP_TCP_PORT_MIN + 5000}; constexpr static uint16_t UPNP_UDP_PORT_MIN {20000}; constexpr static uint16_t UPNP_UDP_PORT_MAX {UPNP_UDP_PORT_MIN + 5000}; -UPnPContext::UPnPContext(std::shared_ptr<asio::io_context> ctx, std::shared_ptr<dht::log::Logger> logger) +UPnPContext::UPnPContext(const std::shared_ptr<asio::io_context>& ioContext, const std::shared_ptr<dht::log::Logger>& logger) : mappingListUpdateTimer_(*ioContext) { // JAMI_DBG("Creating UPnPContext instance [%p]", this);