diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-24 18:33:48 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-24 18:33:48 +0000 |
commit | f700d93bf8e9caa3f619c1e3d53b59f02886b455 (patch) | |
tree | 083adec076d008f213e3bab0001b5752569bf198 /funcs | |
parent | dbd425a39fd534ed795b775379dd0ae06c8b174c (diff) |
Do the (expensive) LOCAL_USER_ADD only after we are sure
that arguments are valid.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@14785 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_enum.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/funcs/func_enum.c b/funcs/func_enum.c index 5f1b01d56..87f321edc 100644 --- a/funcs/func_enum.c +++ b/funcs/func_enum.c @@ -141,14 +141,14 @@ static int function_txtcidname(struct ast_channel *chan, char *cmd, buf[0] = '\0'; - LOCAL_USER_ADD(u); if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "TXTCIDNAME requires an argument (number)\n"); - LOCAL_USER_REMOVE(u); return -1; } + LOCAL_USER_ADD(u); + res = ast_get_txt(chan, data, dest, sizeof(dest), tech, sizeof(tech), txt, sizeof(txt)); |