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

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Nov 27 14:16:56 CST 2007


Author: kpfleming
Date: Tue Nov 27 14:16:56 2007
New Revision: 89709

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89709
Log:
on second thought... revert all the other changes i've made in app options parsing leaving only one: if an empty argument is supplied for an option, set that argument pointer to point to an empty string rather than NULL, so that the application can do normal checks on it without worrying about it being NULL

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=89709&r1=89708&r2=89709
==============================================================================
--- branches/1.4/main/app.c (original)
+++ branches/1.4/main/app.c Tue Nov 27 14:16:56 2007
@@ -1408,11 +1408,7 @@
 				break;
 			}
 		} else if (argloc) {
-			args[argloc - 1] = NULL;
-		}
-		if (argloc && ast_strlen_zero(args[argloc - 1])) {
-			ast_log(LOG_WARNING, "Argument supplied for option '%c' was empty, option ignored.\n", curarg);
-			continue;
+			args[argloc - 1] = "";
 		}
 		ast_set_flag(flags, options[curarg].flag);
 	}




More information about the svn-commits mailing list