mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
handle invalid log level strings. (FSCORE-69)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6604 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -3002,6 +3002,9 @@ static JSBool js_log(JSContext * cx, JSObject * obj, uintN argc, jsval * argv, j
|
||||
if (argc > 1) {
|
||||
if ((level_str = JS_GetStringBytes(JS_ValueToString(cx, argv[0])))) {
|
||||
level = switch_log_str2level(level_str);
|
||||
if (level == SWITCH_LOG_INVALID) {
|
||||
level = SWITCH_LOG_DEBUG;
|
||||
}
|
||||
}
|
||||
|
||||
if ((msg = JS_GetStringBytes(JS_ValueToString(cx, argv[1])))) {
|
||||
|
Reference in New Issue
Block a user