From: Tilghman Lesher Date: Tue, 25 Aug 2009 06:34:44 +0000 (+0000) Subject: Improve error message by informing user exactly which function is missing a parethesis. X-Git-Tag: 1.4.26.2~4^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0055593341f79f9e9cf0261c14dfcd24ef2a145f;p=thirdparty%2Fasterisk.git Improve error message by informing user exactly which function is missing a parethesis. (closes issue #15242) Reported by: Nick_Lewis Patches: pbx.c-funcparenthesis.patch2 uploaded by dbrooks (license 790) pbx.c-funcparenthesis-1.4.diff uploaded by loloski (license 68) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@213970 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/pbx.c b/main/pbx.c index f34661ce5d..1672b53320 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -1529,14 +1529,14 @@ static char *func_args(char *function) char *args = strchr(function, '('); if (!args) - ast_log(LOG_WARNING, "Function doesn't contain parentheses. Assuming null argument.\n"); + ast_log(LOG_WARNING, "Function '%s' doesn't contain parentheses. Assuming null argument.\n", function); else { char *p; *args++ = '\0'; if ((p = strrchr(args, ')')) ) *p = '\0'; else - ast_log(LOG_WARNING, "Can't find trailing parenthesis?\n"); + ast_log(LOG_WARNING, "Can't find trailing parenthesis for function '%s(%s'?\n", function, args); } return args; }