pass peer_ip by const ref

This commit is contained in:
Isaac Connor 2021-04-20 17:16:09 -04:00
parent 05e7b6dfc5
commit c83b9190cb
1 changed files with 2 additions and 2 deletions

View File

@ -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);
});