[asterisk-commits] file: trunk r90550 - in /trunk: ./ include/asterisk/ main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Dec 3 12:44:17 CST 2007


Author: file
Date: Mon Dec  3 12:44:16 2007
New Revision: 90550

URL: http://svn.digium.com/view/asterisk?view=rev&rev=90550
Log:
Merged revisions 90548 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90548 | file | 2007-12-03 14:40:56 -0400 (Mon, 03 Dec 2007) | 2 lines

Preserve the indication currently playing on a channel when a masquerade operation happens. (issue #BE-88)

........

Modified:
    trunk/   (props changed)
    trunk/.cleancount
    trunk/include/asterisk/channel.h
    trunk/main/channel.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/.cleancount
URL: http://svn.digium.com/view/asterisk/trunk/.cleancount?view=diff&rev=90550&r1=90549&r2=90550
==============================================================================
--- trunk/.cleancount (original)
+++ trunk/.cleancount Mon Dec  3 12:44:16 2007
@@ -1,1 +1,1 @@
-32
+33

Modified: trunk/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/channel.h?view=diff&rev=90550&r1=90549&r2=90550
==============================================================================
--- trunk/include/asterisk/channel.h (original)
+++ trunk/include/asterisk/channel.h Mon Dec  3 12:44:16 2007
@@ -505,6 +505,7 @@
 	int epfd;
 	struct ast_epoll_data *epfd_data[AST_MAX_FDS];
 #endif
+	int visible_indication;                         /*!< Indication currently playing on the channel */
 };
 
 /*! \brief ast_channel_tech Properties */

Modified: trunk/main/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/main/channel.c?view=diff&rev=90550&r1=90549&r2=90550
==============================================================================
--- trunk/main/channel.c (original)
+++ trunk/main/channel.c Mon Dec  3 12:44:16 2007
@@ -1519,7 +1519,7 @@
 	default:
 		break;
 	}
-
+	chan->visible_indication = 0;
 	ast_channel_unlock(chan);
 
 	return res;
@@ -2557,6 +2557,7 @@
 				ast_debug(1, "Driver for channel '%s' does not support indication %d, emulating it\n", chan->name, condition);
 				ast_playtones_start(chan,0,ts->data, 1);
 				res = 0;
+				chan->visible_indication = condition;
 			} else if (condition == AST_CONTROL_PROGRESS) {
 				/* ast_playtones_stop(chan); */
 			} else if (condition == AST_CONTROL_PROCEEDING) {
@@ -2573,7 +2574,9 @@
 				res = -1;
 			}
 		}
-	}
+	} else
+		chan->visible_indication = condition;
+
 	return res;
 }
 
@@ -3724,6 +3727,10 @@
 	} else
 		ast_log(LOG_WARNING, "Channel type '%s' does not have a fixup routine (for %s)!  Bad things may happen.\n",
 			original->tech->type, original->name);
+
+	/* If an indication is currently playing maintain it on the channel that is taking the place of original */
+	if (original->visible_indication)
+		ast_indicate(original, original->visible_indication);
 	
 	/* Now, at this point, the "clone" channel is totally F'd up.  We mark it as
 	   a zombie so nothing tries to touch it.  If it's already been marked as a




More information about the asterisk-commits mailing list