From c83b9190cb38ac6c09c8999ed39997968aaf652f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 20 Apr 2021 17:16:09 -0400 Subject: [PATCH] pass peer_ip by const ref --- src/zm_rtsp_server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_rtsp_server.cpp b/src/zm_rtsp_server.cpp index 339ffe2f9..fab5300c5 100644 --- a/src/zm_rtsp_server.cpp +++ b/src/zm_rtsp_server.cpp @@ -217,11 +217,11 @@ int main(int argc, char *argv[]) { xop::MediaSession *session = sessions[i] = xop::MediaSession::CreateNew(streamname); if (session) { - session->AddNotifyConnectedCallback([] (xop::MediaSessionId sessionId, std::string peer_ip, uint16_t peer_port){ + session->AddNotifyConnectedCallback([] (xop::MediaSessionId sessionId, const std::string &peer_ip, uint16_t peer_port){ Debug(1, "RTSP client connect, ip=%s, port=%hu \n", peer_ip.c_str(), peer_port); }); - session->AddNotifyDisconnectedCallback([](xop::MediaSessionId sessionId, std::string peer_ip, uint16_t peer_port) { + session->AddNotifyDisconnectedCallback([](xop::MediaSessionId sessionId, const std::string &peer_ip, uint16_t peer_port) { Debug(1, "RTSP client disconnect, ip=%s, port=%hu \n", peer_ip.c_str(), peer_port); });