[Freeswitch-svn] [commit] r3305 - freeswitch/trunk/src/mod/languages/mod_spidermonkey
Freeswitch SVN
mikej at freeswitch.org
Fri Nov 10 11:04:23 EST 2006
Author: mikej
Date: Fri Nov 10 11:04:22 2006
New Revision: 3305
Modified:
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
Log:
fix segfault when no filename is available to log.
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Fri Nov 10 11:04:22 2006
@@ -451,7 +451,7 @@
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 : "");
}
More information about the Freeswitch-svn
mailing list