pass peer_ip by const ref
This commit is contained in:
parent
05e7b6dfc5
commit
c83b9190cb
|
@ -217,11 +217,11 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
xop::MediaSession *session = sessions[i] = xop::MediaSession::CreateNew(streamname);
|
xop::MediaSession *session = sessions[i] = xop::MediaSession::CreateNew(streamname);
|
||||||
if (session) {
|
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);
|
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);
|
Debug(1, "RTSP client disconnect, ip=%s, port=%hu \n", peer_ip.c_str(), peer_port);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue