mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-02 11:19:28 +00:00
apiExecute, in js_api_execute, set the stream.write_function before doing switch_api_execute (fixes jira MODLANG-2)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4384 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e40c1064ee
commit
ad7f54e3b7
@ -2300,8 +2300,8 @@ static JSBool js_api_execute(JSContext *cx, JSObject *obj, uintN argc, jsval *ar
|
|||||||
stream.data = retbuf;
|
stream.data = retbuf;
|
||||||
stream.end = stream.data;
|
stream.end = stream.data;
|
||||||
stream.data_size = sizeof(retbuf);
|
stream.data_size = sizeof(retbuf);
|
||||||
switch_api_execute(cmd, arg, session, &stream);
|
|
||||||
stream.write_function = switch_console_stream_write;
|
stream.write_function = switch_console_stream_write;
|
||||||
|
switch_api_execute(cmd, arg, session, &stream);
|
||||||
|
|
||||||
*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, retbuf));
|
*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, retbuf));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user