[svn-commits] rmudgett: branch 11 r390047 - in /branches/11: ./ main/channel.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed May 29 15:18:05 CDT 2013
Author: rmudgett
Date: Wed May 29 15:18:01 2013
New Revision: 390047
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390047
Log:
Fix segfault when dealing with chan_agent channels.
Check the returned bridged pointer for NULL to avoid a crash. It looks
like chan_agent is returning a NULL pointer when it probably should be
returning a pointer to the channel the Agent channel is pretending to be.
(closes issue ASTERISK-21793)
Reported by: Rodrigo P. Telles
Patches:
jira_asterisk_21793_v1.8.patch (license #5621) patch uploaded by rmudgett
Tested by: Rodrigo P. Telles
........
Merged revisions 390044 from http://svn.asterisk.org/svn/asterisk/branches/1.8
Modified:
branches/11/ (props changed)
branches/11/main/channel.c
Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/11/main/channel.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/main/channel.c?view=diff&rev=390047&r1=390046&r2=390047
==============================================================================
--- branches/11/main/channel.c (original)
+++ branches/11/main/channel.c Wed May 29 15:18:01 2013
@@ -6625,14 +6625,14 @@
linkedid = oldest_linkedid(linkedid, ast_channel_uniqueid(peer));
if (ast_channel_internal_bridged_channel(chan)) {
bridged = ast_bridged_channel(chan);
- if (bridged != peer) {
+ if (bridged && bridged != peer) {
linkedid = oldest_linkedid(linkedid, ast_channel_linkedid(bridged));
linkedid = oldest_linkedid(linkedid, ast_channel_uniqueid(bridged));
}
}
if (ast_channel_internal_bridged_channel(peer)) {
bridged = ast_bridged_channel(peer);
- if (bridged != chan) {
+ if (bridged && bridged != chan) {
linkedid = oldest_linkedid(linkedid, ast_channel_linkedid(bridged));
linkedid = oldest_linkedid(linkedid, ast_channel_uniqueid(bridged));
}
@@ -6645,13 +6645,13 @@
ast_channel_change_linkedid(peer, linkedid);
if (ast_channel_internal_bridged_channel(chan)) {
bridged = ast_bridged_channel(chan);
- if (bridged != peer) {
+ if (bridged && bridged != peer) {
ast_channel_change_linkedid(bridged, linkedid);
}
}
if (ast_channel_internal_bridged_channel(peer)) {
bridged = ast_bridged_channel(peer);
- if (bridged != chan) {
+ if (bridged && bridged != chan) {
ast_channel_change_linkedid(bridged, linkedid);
}
}
More information about the svn-commits
mailing list