[asterisk-commits] dbrooks: branch 1.4 r229498 - /branches/1.4/main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Nov 11 13:46:24 CST 2009
Author: dbrooks
Date: Wed Nov 11 13:46:19 2009
New Revision: 229498
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=229498
Log:
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
Modified:
branches/1.4/main/pbx.c
Modified: branches/1.4/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/main/pbx.c?view=diff&rev=229498&r1=229497&r2=229498
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Wed Nov 11 13:46:19 2009
@@ -1893,22 +1893,23 @@
}
} 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)
- 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)
- 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)
- 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)
- 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:
if (option_debug)
More information about the asterisk-commits
mailing list