From 3fe0b471c105d89cea7eea2418231ca0986dcdc8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 18 Jan 2013 10:24:18 -0600 Subject: [PATCH] switch rtp flags format usage on switch_rtp_new --- src/mod/applications/mod_esf/mod_esf.c | 2 +- src/mod/applications/mod_oreka/mod_oreka.c | 2 +- src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c | 2 +- src/mod/endpoints/mod_h323/mod_h323.cpp | 9 +++++---- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/mod/applications/mod_esf/mod_esf.c b/src/mod/applications/mod_esf/mod_esf.c index 9d9aabdbae..db14550af0 100644 --- a/src/mod/applications/mod_esf/mod_esf.c +++ b/src/mod/applications/mod_esf/mod_esf.c @@ -65,7 +65,7 @@ SWITCH_STANDARD_APP(bcast_function) switch_size_t bytes; ls_control_packet_t control_packet; switch_codec_t codec = { 0 }; - uint32_t flags = 0; + switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID] = {0}; const char *err; switch_rtp_t *rtp_session = NULL; switch_port_t rtp_port; diff --git a/src/mod/applications/mod_oreka/mod_oreka.c b/src/mod/applications/mod_oreka/mod_oreka.c index 64f5e8ffd3..ba09ba198d 100644 --- a/src/mod/applications/mod_oreka/mod_oreka.c +++ b/src/mod/applications/mod_oreka/mod_oreka.c @@ -109,7 +109,7 @@ static int oreka_tear_down_rtp(oreka_session_t *oreka, oreka_stream_type_t type) static int oreka_setup_rtp(oreka_session_t *oreka, oreka_stream_type_t type) { switch_port_t rtp_port = 0; - switch_rtp_flag_t flags = 0; + switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID] = {0}; switch_rtp_t *rtp_stream = NULL; switch_codec_implementation_t *codec_impl = NULL; switch_status_t status = SWITCH_STATUS_SUCCESS; diff --git a/src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c b/src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c index 4cc3c2de79..7b03c5d559 100644 --- a/src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c +++ b/src/mod/codecs/mod_sangoma_codec/mod_sangoma_codec.c @@ -251,7 +251,7 @@ static int sangoma_create_rtp(void *usr_priv, sngtc_codec_request_leg_t *codec_r switch_memory_pool_t *sesspool = NULL; switch_rtp_t *rtp_session = NULL; char codec_ip[255]; - switch_rtp_flag_t flags = 0; + switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID] = {0}; int iana = 0; const char *err = NULL; struct in_addr local_ip_addr = { 0 }; diff --git a/src/mod/endpoints/mod_h323/mod_h323.cpp b/src/mod/endpoints/mod_h323/mod_h323.cpp index 2e7050e850..f4652e86d7 100644 --- a/src/mod/endpoints/mod_h323/mod_h323.cpp +++ b/src/mod/endpoints/mod_h323/mod_h323.cpp @@ -1947,7 +1947,7 @@ PBoolean FSH323_ExternalRTPChannel::Start() switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG,"======>FSH323_ExternalRTPChannel::Start() [%p]\n",this); const char *err = NULL; - switch_rtp_flag_t flags; + switch_rtp_flag_t flags[SWITCH_RTP_FLAG_INVALID] = {0}; char * timer_name = NULL; const char *var; @@ -2145,15 +2145,16 @@ PBoolean FSH323_ExternalRTPChannel::Start() } if ((!m_conn->m_startRTP)) { - flags = (switch_rtp_flag_t) (SWITCH_RTP_FLAG_DATAWAIT|SWITCH_RTP_FLAG_RAW_WRITE); + flags[SWITCH_RTP_FLAG_DATAWAIT]++; + flags[SWITCH_RTP_FLAG_RAW_WRITE]++; if (mod_h323_globals.use_rtp_timer) { - flags |= SWITCH_RTP_FLAG_USE_TIMER; + flags[SWITCH_RTP_FLAG_USE_TIMER]++; timer_name = mod_h323_globals.rtp_timer_name; } else { if ((var = switch_channel_get_variable(m_fsChannel, "timer_name"))) { timer_name = (char *) var; - flags |= SWITCH_RTP_FLAG_USE_TIMER; + flags[SWITCH_RTP_FLAG_USE_TIMER]++; } }