[asterisk-commits] mmichelson: branch mmichelson/chan_fixup r173315 - in /team/mmichelson/chan_f...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 3 19:10:32 CST 2009


Author: mmichelson
Date: Tue Feb  3 19:10:32 2009
New Revision: 173315

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=173315
Log:
Be a little more cpp-friendly by not using "new" as a variable name


Modified:
    team/mmichelson/chan_fixup/include/asterisk/autochan.h
    team/mmichelson/chan_fixup/main/autochan.c

Modified: team/mmichelson/chan_fixup/include/asterisk/autochan.h
URL: http://svn.digium.com/svn-view/asterisk/team/mmichelson/chan_fixup/include/asterisk/autochan.h?view=diff&rev=173315&r1=173314&r2=173315
==============================================================================
--- team/mmichelson/chan_fixup/include/asterisk/autochan.h (original)
+++ team/mmichelson/chan_fixup/include/asterisk/autochan.h Tue Feb  3 19:10:32 2009
@@ -41,7 +41,7 @@
 
 void ast_autochan_destroy(struct ast_autochan *autochan);
 
-void ast_autochan_new_channel(struct ast_channel *old, struct ast_channel *new);
+void ast_autochan_new_channel(struct ast_channel *old_chan, struct ast_channel *new_chan);
 
 #define ast_autochan_lock(a) ast_mutex_lock(&a->lock)
 #define ast_autochan_unlock(a) ast_mutex_unlock(&a->lock)

Modified: team/mmichelson/chan_fixup/main/autochan.c
URL: http://svn.digium.com/svn-view/asterisk/team/mmichelson/chan_fixup/main/autochan.c?view=diff&rev=173315&r1=173314&r2=173315
==============================================================================
--- team/mmichelson/chan_fixup/main/autochan.c (original)
+++ team/mmichelson/chan_fixup/main/autochan.c Tue Feb  3 19:10:32 2009
@@ -78,17 +78,18 @@
 	ast_free(autochan);
 }
 
-void ast_autochan_new_channel(struct ast_channel *old, struct ast_channel *new)
+void ast_autochan_new_channel(struct ast_channel *old_chan, struct ast_channel *new_chan)
 {
 	struct ast_autochan *autochan;
 
 	AST_LIST_LOCK(&autochans);
 	AST_LIST_TRAVERSE(&autochans, autochan, list) {
 		ast_autochan_lock(autochan);
-		if (autochan->chan == old) {
-			autochan->chan = new;
+		if (autochan->chan == old_chan) {
+			autochan->chan = new_chan;
 			if (option_debug > 1) {
-				ast_log(LOG_DEBUG, "Autochan %p used to hold channel %s (%p) but now holds channel %s (%p)\n", autochan, old->name, old, new->name, new);
+				ast_log(LOG_DEBUG, "Autochan %p used to hold channel %s (%p) but now holds channel %s (%p)\n", 
+						autochan, old_chan->name, old_chan, new_chan->name, new_chan);
 			}
 		}
 		ast_autochan_unlock(autochan);




More information about the asterisk-commits mailing list