From 55abf077f0d48eaed5020cfb1a61e59100f0b2bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Wed, 19 Jul 2023 10:21:21 -0400
Subject: [PATCH] upnp: fix constructor

Change-Id: I6c8082c7452c371d3c1afc03846452cf0d547e20
---
 include/upnp/upnp_context.h | 2 +-
 src/upnp/upnp_context.cpp   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/upnp/upnp_context.h b/include/upnp/upnp_context.h
index bd1cc2b..a486eb5 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 93af971..6b1ff90 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);
-- 
GitLab