[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r323105 - /team/irroot/distr...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 13 05:19:49 CDT 2011
Author: irroot
Date: Mon Jun 13 05:19:46 2011
New Revision: 323105
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=323105
Log:
Rework format update in sip_write
Modified:
team/irroot/distrotech-customers-trunk/channels/chan_sip.c
Modified: team/irroot/distrotech-customers-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_sip.c?view=diff&rev=323105&r1=323104&r2=323105
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_sip.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_sip.c Mon Jun 13 05:19:46 2011
@@ -6350,9 +6350,9 @@
ast_getformatname_multiple(s1, sizeof(s1), ast->nativeformats),
ast_getformatname(&ast->readformat),
ast_getformatname(&ast->writeformat));
+ ast_set_write_format_by_id(ast, frame->subclass.format.id);
bridge = ast_bridged_channel(ast);
- if (!ast_channel_trylock(bridge)) {
- ast_set_write_format_by_id(ast, frame->subclass.format.id);
+ if (bridge && !ast_channel_trylock(bridge)) {
ast_log(LOG_WARNING, "Attempting to change formats making %s and %s compat.\n", ast->name, bridge->name);
ast_channel_make_compatible(ast, bridge);
ast_channel_unlock(bridge);
More information about the asterisk-commits
mailing list