[Asterisk-cvs] asterisk/channels chan_agent.c,1.166,1.167

russell russell
Sun Nov 6 17:26:35 CST 2005


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv5319/channels

Modified Files:
	chan_agent.c 
Log Message:
don't loop forever on an invalid options string (issue #5629)


Index: chan_agent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_agent.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -d -r1.166 -r1.167
--- chan_agent.c	6 Nov 2005 15:09:46 -0000	1.166
+++ chan_agent.c	6 Nov 2005 22:17:47 -0000	1.167
@@ -1658,13 +1658,12 @@
 STANDARD_LOCAL_USER;
 LOCAL_USER_DECL;
 
-/**
- * Log in agent application.
+/*!
+ * \brief Log in agent application.
  *
- * @param chan
- * @param data
- * @param callbackmode
- * @returns 
+ * \param chan
+ * \param data
+ * \param callbackmode non-zero for AgentCallbackLogin
  */
 static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
 {
@@ -1736,10 +1735,9 @@
 		context = parse;
 	}
 
-	while (!ast_strlen_zero(args.options)) {
-		if (*args.options == 's') {
+	if (!ast_strlen_zero(args.options)) {
+		if (strchr(args.options, 's')) {
 			play_announcement = 0;
-			break;
 		}
 	}
 




More information about the svn-commits mailing list