diff options
author | Steve Murphy <murf@digium.com> | 2007-06-23 03:32:59 +0000 |
---|---|---|
committer | Steve Murphy <murf@digium.com> | 2007-06-23 03:32:59 +0000 |
commit | d17beedd5a889926d52a9f1b8b982878b5f6b6cc (patch) | |
tree | 2b94a6397e243c3e11e0eaf324e8833e47d83485 /res | |
parent | e2f71e89377fe42d8cb91186cfec54336dfcba91 (diff) |
Merged revisions 71230 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r71230 | murf | 2007-06-22 21:29:48 -0600 (Fri, 22 Jun 2007) | 1 line
This patch is meant to fix 8433; where clid and src are lost via bridging.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@71231 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_features.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/res/res_features.c b/res/res_features.c index 60f034e2f..fa17f6abe 100644 --- a/res/res_features.c +++ b/res/res_features.c @@ -1835,11 +1835,14 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast /* absorb the channel cdr */ ast_cdr_merge(bridge_cdr, chan->cdr); - ast_cdr_discard(chan->cdr); /* no posting these guys */ + if (!ast_test_flag(chan->cdr, AST_CDR_FLAG_LOCKED)) + ast_cdr_discard(chan->cdr); /* if locked cdrs are in chan, they are taken over in the merge */ /* absorb the peer cdr */ ast_cdr_merge(bridge_cdr, peer->cdr); - ast_cdr_discard(peer->cdr); /* no posting these guys */ + if (ast_test_flag(peer->cdr, AST_CDR_FLAG_LOCKED)) + ast_cdr_discard(peer->cdr); /* if locked cdrs are in peer, they are taken over in the merge */ + peer->cdr = NULL; chan->cdr = bridge_cdr; /* make this available to the rest of the world via the chan while the call is in progress */ } else if (chan->cdr) { @@ -1847,14 +1850,16 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast ast_cdr_init(bridge_cdr,chan); /* absorb this data */ ast_cdr_merge(bridge_cdr, chan->cdr); - ast_cdr_discard(chan->cdr); /* no posting these guys */ + if (!ast_test_flag(chan->cdr, AST_CDR_FLAG_LOCKED)) + ast_cdr_discard(chan->cdr); /* if locked cdrs are in chan, they are taken over in the merge */ chan->cdr = bridge_cdr; /* make this available to the rest of the world via the chan while the call is in progress */ } else if (peer->cdr) { /* take the cdr from the peer - literally */ ast_cdr_init(bridge_cdr,peer); /* absorb this data */ ast_cdr_merge(bridge_cdr, peer->cdr); - ast_cdr_discard(peer->cdr); /* no posting these guys */ + if (!ast_test_flag(chan->cdr, AST_CDR_FLAG_LOCKED)) + ast_cdr_discard(chan->cdr); /* if locked cdrs are in chan, they are taken over in the merge */ peer->cdr = NULL; peer->cdr = bridge_cdr; /* make this available to the rest of the world via the chan while the call is in progress */ } else { |