dect
/
asterisk
Archived
13
0
Fork 0

print an error message if invalid arguments are specified (issue #5872)

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7230 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2005-11-30 05:29:36 +00:00
parent 412f5380a1
commit b1b8d69467
1 changed files with 3 additions and 1 deletions

View File

@ -252,6 +252,8 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
}
}
}
} else {
return ERROR_NOARG;
}
return 0;
}
@ -385,7 +387,7 @@ static char *acf_cut_exec(struct ast_channel *chan, char *cmd, char *data, char
switch (cut_internal(chan, data, buf, len)) {
case ERROR_NOARG:
ast_log(LOG_ERROR, "Cut() requires an argument\n");
ast_log(LOG_ERROR, "CUT() requires an argument\n");
break;
case ERROR_NOMEM:
ast_log(LOG_ERROR, "Out of memory\n");