[svn-commits] kpfleming: branch 1.4 r89701 - /branches/1.4/main/app.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 27 13:36:55 CST 2007


Author: kpfleming
Date: Tue Nov 27 13:36:55 2007
New Revision: 89701

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89701
Log:
generate a warning when an application option that requires an argument is ignored due to lack of an argument

Modified:
    branches/1.4/main/app.c

Modified: branches/1.4/main/app.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/app.c?view=diff&rev=89701&r1=89700&r2=89701
==============================================================================
--- branches/1.4/main/app.c (original)
+++ branches/1.4/main/app.c Tue Nov 27 13:36:55 2007
@@ -1410,8 +1410,11 @@
 		} else if (argloc) {
 			args[argloc - 1] = NULL;
 		}
-		if (!argloc || !ast_strlen_zero(args[argloc - 1]))
-			ast_set_flag(flags, options[curarg].flag);
+		if (argloc && ast_strlen_zero(args[argloc - 1])) {
+			ast_log(LOG_WARNING, "Argument supplied for option '%c' was empty, option ignored.\n", curarg);
+			continue;
+		}
+		ast_set_flag(flags, options[curarg].flag);
 	}
 
 	return res;




More information about the svn-commits mailing list