[asterisk-commits] mmichelson: branch mmichelson/atxfer_features r392321 - /team/mmichelson/atxf...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 20 11:35:40 CDT 2013
Author: mmichelson
Date: Thu Jun 20 11:35:38 2013
New Revision: 392321
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392321
Log:
Fix some broken logic in the COMPLETE state.
It's possible for the state to be entered with the transferer
channel gone. Thus the bridge merge needs to take that into account.
Also, the unhold needs to be handled differently since the transferer
channel is not going to be in the merged bridge.
Modified:
team/mmichelson/atxfer_features/main/bridging_basic.c
Modified: team/mmichelson/atxfer_features/main/bridging_basic.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/main/bridging_basic.c?view=diff&rev=392321&r1=392320&r2=392321
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging_basic.c (original)
+++ team/mmichelson/atxfer_features/main/bridging_basic.c Thu Jun 20 11:35:38 2013
@@ -643,14 +643,29 @@
static int complete_enter(struct attended_transfer_properties *props)
{
- if (ast_bridge_merge(props->transferee_bridge, props->target_bridge, 0, &props->transferer, 1)) {
+ int res;
+
+ if (props->transferer) {
+ res = ast_bridge_merge(props->transferee_bridge, props->target_bridge, 0, &props->transferer, 1);
+ } else {
+ res = ast_bridge_merge(props->transferee_bridge, props->target_bridge, 0, NULL, 0);
+ }
+
+ if (res) {
return -1;
}
/* XXX Same unhold concern here as in the threeway state. However, there
* is no guarantee here that the resulting bridge's technology will be.
*/
- unhold(props->transferer);
+ if (props->transferer) {
+ /* XXX Either transferee or transfer target could be on hold depending
+ * on where the transferer was when the transfer was completed. Need to
+ * throw an unhold at the bridge and let it take effect where it makes
+ * sense.
+ */
+ }
+
return 0;
}
More information about the asterisk-commits
mailing list