[svn-commits] jpeeler: branch 1.6.2 r197176 - in /branches/1.6.2: include/asterisk/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed May 27 12:28:46 CDT 2009


Author: jpeeler
Date: Wed May 27 12:28:36 2009
New Revision: 197176

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=197176
Log:
Fix broken attended transfers
  
The bridge was terminating immediately after the attended transfer was 
completed. The problem was because upon reentering ast_channel_bridge
nexteventts was checked to see if it was set and if so could possibly
return AST_BRIDGE_COMPLETE.
  
(closes issue #15183)
Reported by: andrebarbosa
Tested by: andrebarbosa, tootai, loloski

Modified:
    branches/1.6.2/include/asterisk/channel.h
    branches/1.6.2/main/channel.c

Modified: branches/1.6.2/include/asterisk/channel.h
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/include/asterisk/channel.h?view=diff&rev=197176&r1=197175&r2=197176
==============================================================================
--- branches/1.6.2/include/asterisk/channel.h (original)
+++ branches/1.6.2/include/asterisk/channel.h Wed May 27 12:28:36 2009
@@ -584,6 +584,7 @@
 	struct ast_flags features_callee;
 	struct timeval start_time;
 	struct timeval nexteventts;
+	struct timeval partialfeature_timer;
 	long feature_timer;
 	long timelimit;
 	long play_warning;

Modified: branches/1.6.2/main/channel.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.6.2/main/channel.c?view=diff&rev=197176&r1=197175&r2=197176
==============================================================================
--- branches/1.6.2/main/channel.c (original)
+++ branches/1.6.2/main/channel.c Wed May 27 12:28:36 2009
@@ -4499,10 +4499,11 @@
 	ast_poll_channel_add(c0, c1);
 
 	if (config->feature_timer > 0 && ast_tvzero(config->nexteventts)) {
-		/* nexteventts is not set when the bridge is not scheduled to
- 		 * break, so calculate when the bridge should possibly break
+		/* calculate when the bridge should possibly break
  		 * if a partial feature match timed out */
-		config->nexteventts = ast_tvadd(ast_tvnow(), ast_samp2tv(config->feature_timer, 1000));
+		config->partialfeature_timer = ast_tvadd(ast_tvnow(), ast_samp2tv(config->feature_timer, 1000));
+	} else {
+		memset(&config->partialfeature_timer, 0, sizeof(config->partialfeature_timer));
 	}
 
 	for (;;) {
@@ -4532,8 +4533,8 @@
  			 * to not break, leave the channel bridge when the feature timer
 			 * time has elapsed so the DTMF will be sent to the other side. 
  			 */
-			if (!ast_tvzero(config->nexteventts)) {
-				int diff = ast_tvdiff_ms(config->nexteventts, ast_tvnow());
+			if (!ast_tvzero(config->partialfeature_timer)) {
+				int diff = ast_tvdiff_ms(config->partialfeature_timer, ast_tvnow());
 				if (diff <= 0) {
 					res = AST_BRIDGE_RETRY;
 					break;




More information about the svn-commits mailing list