add patch from MODAPP-86

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9653 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2008-09-26 15:50:12 +00:00
1 parent f428a89f4c
commit 1c15146866
8 files changed
+86 -5

No files matched your search

@@ -2518,7 +2518,7 @@ SWITCH_STANDARD_API(system_function)
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Executing command: %s\n", cmd);
if (system(cmd) < 0) {
if (switch_system(cmd, SWITCH_TRUE) < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Failed to execute command: %s\n", cmd);
}
stream->write_function(stream, "+OK\n");
@@ -1185,7 +1185,7 @@ SWITCH_STANDARD_APP(fax_detect_session_function)
SWITCH_STANDARD_APP(system_session_function)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Executing command: %s\n", data);
if (system(data) < 0) {
if (switch_system(data, SWITCH_TRUE) < 0) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Failed to execute command: %s\n", data);
}
}
+1 -1
View File
@@ -36,7 +36,7 @@ static int os_pushresult (lua_State *L, int i, const char *filename) {
static int os_execute (lua_State *L) {
lua_pushinteger(L, system(luaL_optstring(L, 1, NULL)));
lua_pushinteger(L, switch_system(luaL_optstring(L, 1, NULL), SWITCH_TRUE));
return 1;
}
@@ -3427,7 +3427,7 @@ static JSBool js_system(JSContext * cx, JSObject * obj, uintN argc, jsval * argv
*rval = BOOLEAN_TO_JSVAL(JS_FALSE);
if (argc > 0 && (cmd = JS_GetStringBytes(JS_ValueToString(cx, argv[0])))) {
*rval = INT_TO_JSVAL(system(cmd));
*rval = INT_TO_JSVAL(switch_system(cmd, SWITCH_TRUE));
return JS_TRUE;
}