提交 2a645dbc authored 作者: Michael Jerris's avatar Michael Jerris

fix segfault when no filename is available to log.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3305 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 2450b0e6
......@@ -451,7 +451,7 @@ JSClass event_class = {
static void js_error(JSContext *cx, const char *message, JSErrorReport *report)
{
if (message) {
switch_log_printf(SWITCH_CHANNEL_ID_LOG, (char *)report->filename, modname, report->lineno, SWITCH_LOG_ERROR,
switch_log_printf(SWITCH_CHANNEL_ID_LOG, report->filename ? (char *)report->filename : "mod_spidermonkey.c", modname, report->lineno, SWITCH_LOG_ERROR,
"%s %s%s\n", message, report->linebuf ? "near " : "", report->linebuf ? report->linebuf : "");
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论