aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authordbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-11 19:51:46 +0000
committerdbrooks <dbrooks@f38db490-d61c-443f-a65b-d21fe96a405b>2009-11-11 19:51:46 +0000
commit82b72edf408b9ac4fcfb60a7be327a50b67357bb (patch)
treee5818c5267b9d1f12f3ea5a50135f90c45fc12b4 /main
parent80b81321eae29a3f18c453cf881b4e9fa7f932c8 (diff)
Merged revisions 229499 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r229499 | dbrooks | 2009-11-11 13:48:18 -0600 (Wed, 11 Nov 2009) | 15 lines Merged revisions 229498 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r229498 | dbrooks | 2009-11-11 13:46:19 -0600 (Wed, 11 Nov 2009) | 8 lines Solaris doesn't like NULL going to ast_log Solaris will crash if NULL is passed to ast_log. This simple patch simply uses S_OR to get around this. (closes issue #15392) Reported by: yrashk ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@229500 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/pbx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/main/pbx.c b/main/pbx.c
index 2bfc34b8f..4c1999b90 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -3152,22 +3152,23 @@ static int pbx_extension_helper(struct ast_channel *c, struct ast_context *con,
}
} else { /* not found anywhere, see what happened */
ast_unlock_contexts();
+ /* Using S_OR here because Solaris doesn't like NULL being passed to ast_log */
switch (q.status) {
case STATUS_NO_CONTEXT:
if (!matching_action && !combined_find_spawn)
- ast_log(LOG_NOTICE, "Cannot find extension context '%s'\n", context);
+ ast_log(LOG_NOTICE, "Cannot find extension context '%s'\n", S_OR(context, ""));
break;
case STATUS_NO_EXTENSION:
if (!matching_action && !combined_find_spawn)
- ast_log(LOG_NOTICE, "Cannot find extension '%s' in context '%s'\n", exten, context);
+ ast_log(LOG_NOTICE, "Cannot find extension '%s' in context '%s'\n", exten, S_OR(context, ""));
break;
case STATUS_NO_PRIORITY:
if (!matching_action && !combined_find_spawn)
- ast_log(LOG_NOTICE, "No such priority %d in extension '%s' in context '%s'\n", priority, exten, context);
+ ast_log(LOG_NOTICE, "No such priority %d in extension '%s' in context '%s'\n", priority, exten, S_OR(context, ""));
break;
case STATUS_NO_LABEL:
if (context && !combined_find_spawn)
- ast_log(LOG_NOTICE, "No such label '%s' in extension '%s' in context '%s'\n", label, exten, context);
+ ast_log(LOG_NOTICE, "No such label '%s' in extension '%s' in context '%s'\n", label, exten, S_OR(context, ""));
break;
default:
ast_debug(1, "Shouldn't happen!\n");