dect
/
asterisk
Archived
13
0
Fork 0

Merged revisions 310287 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r310287 | alecdavis | 2011-03-11 19:47:44 +1300 (Fri, 11 Mar 2011) | 17 lines
  
  remote_bridge_loop: prevent segfault when after transfer of IAX2 of DAHDI call 
  
  If the channel condition is one of the following after breaking out of the loop, don't try to update_peer
  (where x = 0/1)
   1). ZOMBIE
   2). cx->tech_pvt != pvtx
   3). gluex != ast_rtp_instance_get_glue(cx->tech->type))
  
  (closes issue #18781)
  Reported by: alecdavis
  Patches: 
        bug18781.diff3.txt uploaded by alecdavis (license 585)
  Tested by: alecdavis, ZX81
  
  Review: https://reviewboard.asterisk.org/r/1128/
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@310288 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
alecdavis 2011-03-11 06:56:06 +00:00
parent 3faeef27fe
commit 0d726a6c65
1 changed files with 14 additions and 2 deletions

View File

@ -1234,10 +1234,22 @@ static enum ast_bridge_result remote_bridge_loop(struct ast_channel *c0,
cs[1] = cs[2];
}
if (glue0->update_peer(c0, NULL, NULL, NULL, 0, 0)) {
if (ast_test_flag(c0, AST_FLAG_ZOMBIE)) {
ast_debug(1, "Channel '%s' Zombie cleardown from bridge\n", c0->name);
} else if (c0->tech_pvt != pvt0) {
ast_debug(1, "Channel c0->'%s' pvt changed, in bridge with c1->'%s'\n", c0->name, c1->name);
} else if (glue0 != ast_rtp_instance_get_glue(c0->tech->type)) {
ast_debug(1, "Channel c0->'%s' technology changed, in bridge with c1->'%s'\n", c0->name, c1->name);
} else if (glue0->update_peer(c0, NULL, NULL, NULL, 0, 0)) {
ast_log(LOG_WARNING, "Channel '%s' failed to break RTP bridge\n", c0->name);
}
if (glue1->update_peer(c1, NULL, NULL, NULL, 0, 0)) {
if (ast_test_flag(c1, AST_FLAG_ZOMBIE)) {
ast_debug(1, "Channel '%s' Zombie cleardown from bridge\n", c1->name);
} else if (c1->tech_pvt != pvt1) {
ast_debug(1, "Channel c1->'%s' pvt changed, in bridge with c0->'%s'\n", c1->name, c0->name);
} else if (glue1 != ast_rtp_instance_get_glue(c1->tech->type)) {
ast_debug(1, "Channel c1->'%s' technology changed, in bridge with c0->'%s'\n", c1->name, c0->name);
} else if (glue1->update_peer(c1, NULL, NULL, NULL, 0, 0)) {
ast_log(LOG_WARNING, "Channel '%s' failed to break RTP bridge\n", c1->name);
}