From 252fb982f41866ec19b9b619c10c349e02ebee7e Mon Sep 17 00:00:00 2001 From: russell Date: Sat, 21 Jan 2006 20:57:06 +0000 Subject: on this pass, only remove duplicate log messages git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8403 f38db490-d61c-443f-a65b-d21fe96a405b --- pbx.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'pbx.c') diff --git a/pbx.c b/pbx.c index 99840addf..75ae5ea7f 100644 --- a/pbx.c +++ b/pbx.c @@ -1219,11 +1219,8 @@ char *ast_func_read(struct ast_channel *chan, const char *in, char *workspace, s char *ret = "0"; struct ast_custom_function *acfptr; - function = ast_strdupa(in); - if (!function) { - ast_log(LOG_ERROR, "Out of memory\n"); + if (!(function = ast_strdupa(in))) return ret; - } if ((args = strchr(function, '('))) { *args = '\0'; args++; @@ -1254,11 +1251,8 @@ void ast_func_write(struct ast_channel *chan, const char *in, const char *value) char *args = NULL, *function, *p; struct ast_custom_function *acfptr; - function = ast_strdupa(in); - if (!function) { - ast_log(LOG_ERROR, "Out of memory\n"); + if (!(function = ast_strdupa(in))) return; - } if ((args = strchr(function, '('))) { *args = '\0'; args++; @@ -5145,11 +5139,8 @@ static int pbx_builtin_resetcdr(struct ast_channel *chan, void *data) struct ast_flags flags = { 0 }; if (!ast_strlen_zero(data)) { - args = ast_strdupa(data); - if (!args) { - ast_log(LOG_ERROR, "Out of memory!\n"); + if (!(args = ast_strdupa(data))) return -1; - } ast_app_parse_options(resetcdr_opts, &flags, NULL, args); } @@ -5205,8 +5196,6 @@ static int pbx_builtin_gotoiftime(struct ast_channel *chan, void *data) /* struct ast_include include contained garbage here, fixed by zeroing it on get_timerange */ if (ast_build_timing(&timing, s) && ast_check_timing(&timing)) res = pbx_builtin_goto(chan, (void *)ts); - } else { - ast_log(LOG_ERROR, "Memory Error!\n"); } return res; } @@ -5227,12 +5216,8 @@ static int pbx_builtin_execiftime(struct ast_channel *chan, void *data) return -1; } - ptr1 = ast_strdupa(data); - - if (!ptr1) { - ast_log(LOG_ERROR, "Out of Memory!\n"); - return -1; - } + if (!(ptr1 = ast_strdupa(data))) + return -1; ptr2 = ptr1; /* Separate the Application data ptr1 is the time spec ptr2 is the app|data */ -- cgit v1.2.3