mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-01 19:20:05 +00:00
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
This commit is contained in:
parent
2450b0e624
commit
2a645dbc6c
@ -451,7 +451,7 @@ JSClass event_class = {
|
|||||||
static void js_error(JSContext *cx, const char *message, JSErrorReport *report)
|
static void js_error(JSContext *cx, const char *message, JSErrorReport *report)
|
||||||
{
|
{
|
||||||
if (message) {
|
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 : "");
|
"%s %s%s\n", message, report->linebuf ? "near " : "", report->linebuf ? report->linebuf : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user