[asterisk-commits] trunk r20512 - /trunk/channel.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Apr 16 08:22:15 MST 2006


Author: rizzo
Date: Sun Apr 16 10:22:13 2006
New Revision: 20512

URL: http://svn.digium.com/view/asterisk?rev=20512&view=rev
Log:
avoid returning in the middle of a switch() in  ast_answer()


Modified:
    trunk/channel.c

Modified: trunk/channel.c
URL: http://svn.digium.com/view/asterisk/trunk/channel.c?rev=20512&r1=20511&r2=20512&view=diff
==============================================================================
--- trunk/channel.c (original)
+++ trunk/channel.c Sun Apr 16 10:22:13 2006
@@ -1496,8 +1496,6 @@
 		ast_setstate(chan, AST_STATE_UP);
 		if (chan->cdr)
 			ast_cdr_answer(chan->cdr);
-		ast_channel_unlock(chan);
-		return res;
 		break;
 	case AST_STATE_UP:
 		if (chan->cdr)
@@ -1505,7 +1503,7 @@
 		break;
 	}
 	ast_channel_unlock(chan);
-	return 0;
+	return res;
 }
 
 void ast_deactivate_generator(struct ast_channel *chan)



More information about the asterisk-commits mailing list