added debugging to print ip and port of rtmp connection as well as tie the rtmp session and fs session together

This commit is contained in:
William King 2013-01-30 17:37:00 -08:00
parent d8edc031fa
commit f81d17c1e2
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -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 {