oops minor formatting fixes, and taking out

debug message.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matt O'Gorman
2006-01-05 21:04:06 +00:00
parent b157f30e51
commit 6ac09042f1

View File

@@ -118,22 +118,25 @@ static int read_exec(struct ast_channel *chan, void *data)
LOCAL_USER_ADD(u);
argcopy = ast_strdupa(data);
if (!argcopy) {
ast_log(LOG_ERROR, "Out of memory!\n");
LOCAL_USER_REMOVE(u);
return -1;
}
AST_STANDARD_APP_ARGS(arglist, argcopy);
ast_verbose("\n var %s\nfilename %s\nmaxdigits %s\noptions %s\nattempts %s\ntimeout %s\n",arglist.variable,arglist.filename,arglist.maxdigits,arglist.options, arglist.attempts,arglist.timeout);
if(arglist.options){
if (!ast_strlen_zero(arglist.options)) {
ast_app_parse_options(read_app_options, &flags, NULL, arglist.options);
}
if(arglist.attempts) {
if (!ast_strlen_zero(arglist.attempts)) {
tries = atoi(arglist.attempts);
if (tries <= 0)
tries = 1;
}
if(arglist.timeout) {
if (!ast_strlen_zero(arglist.timeout)) {
to = atoi(arglist.timeout);
if (to <= 0)
to = 0;
@@ -144,7 +147,7 @@ static int read_exec(struct ast_channel *chan, void *data)
if (ast_strlen_zero(arglist.filename)) {
arglist.filename = NULL;
}
if (arglist.maxdigits) {
if (!ast_strlen_zero(arglist.maxdigits)) {
maxdigits = atoi(arglist.maxdigits);
if ((maxdigits<1) || (maxdigits>255)) {
maxdigits = 255;