[Freeswitch-svn] [commit] r12807 - freeswitch/trunk/src
FreeSWITCH SVN
mrene at freeswitch.org
Fri Mar 27 11:30:33 PDT 2009
Author: mrene
Date: Fri Mar 27 13:30:32 2009
New Revision: 12807
Log:
Use switch_channel_set_variable_printf instead of snprintf of a stack-allocated buffer
Modified:
freeswitch/trunk/src/switch_ivr_originate.c
Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c (original)
+++ freeswitch/trunk/src/switch_ivr_originate.c Fri Mar 27 13:30:32 2009
@@ -547,15 +547,10 @@
const char *var = switch_channel_get_variable(caller_channel, "inherit_codec");
if (switch_true(var)) {
switch_codec_implementation_t impl;
- char tmp[128] = "";
-
switch_core_session_get_read_impl(originate_status[pindex].peer_session, &impl);
- switch_snprintf(tmp, sizeof(tmp), "%s@%uk@%ui", impl.iananame, impl.samples_per_second, impl.microseconds_per_packet / 1000);
- switch_channel_set_variable(caller_channel, "absolute_codec_string", tmp);
+ switch_channel_set_variable_printf(caller_channel, "absolute_codec_string", "%s@%uk@%ui", impl.iananame, impl.samples_per_second, impl.microseconds_per_packet / 1000);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Setting codec string on %s to %s\n", switch_channel_get_name(caller_channel), tmp);
-
-
}
}
More information about the Freeswitch-svn
mailing list