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:
Michael Jerris 2007-02-23 22:43:11 +00:00
parent e40c1064ee
commit ad7f54e3b7

View File

@ -2300,8 +2300,8 @@ static JSBool js_api_execute(JSContext *cx, JSObject *obj, uintN argc, jsval *ar
stream.data = retbuf;
stream.end = stream.data;
stream.data_size = sizeof(retbuf);
switch_api_execute(cmd, arg, session, &stream);
stream.write_function = switch_console_stream_write;
switch_api_execute(cmd, arg, session, &stream);
*rval = STRING_TO_JSVAL (JS_NewStringCopyZ(cx, retbuf));
} else {