From 037bd48c8cfcde0dbdf4deb0ff78a268ebf18e98 Mon Sep 17 00:00:00 2001 From: William King Date: Wed, 30 Jan 2013 17:37:00 -0800 Subject: [PATCH] added debugging to print ip and port of rtmp connection as well as tie the rtmp session and fs session together --- src/mod/endpoints/mod_rtmp/mod_rtmp.c | 3 ++- src/mod/endpoints/mod_rtmp/rtmp_tcp.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mod/endpoints/mod_rtmp/mod_rtmp.c b/src/mod/endpoints/mod_rtmp/mod_rtmp.c index 24603ba806..f4cbe656c8 100644 --- a/src/mod/endpoints/mod_rtmp/mod_rtmp.c +++ b/src/mod/endpoints/mod_rtmp/mod_rtmp.c @@ -857,7 +857,8 @@ switch_call_cause_t rtmp_session_create_call(rtmp_session_t *rsession, switch_co if (!(*newsession = switch_core_session_request(rtmp_globals.rtmp_endpoint_interface, SWITCH_CALL_DIRECTION_INBOUND, SOF_NONE, NULL))) { return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER; } - + switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "New FreeSWITCH session created: %s\n", + switch_core_session_get_uuid(*newsession)); pool = switch_core_session_get_pool(*newsession); channel = switch_core_session_get_channel(*newsession); diff --git a/src/mod/endpoints/mod_rtmp/rtmp_tcp.c b/src/mod/endpoints/mod_rtmp/rtmp_tcp.c index 2cfd93b677..650663d493 100644 --- a/src/mod/endpoints/mod_rtmp/rtmp_tcp.c +++ b/src/mod/endpoints/mod_rtmp/rtmp_tcp.c @@ -247,6 +247,8 @@ void *SWITCH_THREAD_FUNC rtmp_io_tcp_thread(switch_thread_t *thread, void *obj) switch_get_addr(ipbuf, sizeof(ipbuf), addr); newsession->remote_address = switch_core_strdup(newsession->pool, ipbuf); newsession->remote_port = switch_sockaddr_get_port(addr); + switch_log_printf(SWITCH_CHANNEL_UUID_LOG(newsession->uuid), SWITCH_LOG_INFO, "Rtmp connection from %s:%i\n", + newsession->remote_address, newsession->remote_port); } } } else {