aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-29 06:12:29 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2005-11-29 06:12:29 +0000
commit69c7d936915ab520bb755cebe013d179392bf175 (patch)
treecd335cb36c0d0b9ddc4cfec607f1f56b3a8b30f7
parent40a6413566b7e980e4fb0e266280bc90dcb6badc (diff)
print an error message if invalid arguments are specified
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7218 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xapps/app_cut.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_cut.c b/apps/app_cut.c
index 87654fd24..b6b457ab7 100755
--- a/apps/app_cut.c
+++ b/apps/app_cut.c
@@ -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");