Use Freeswitch for mkdir (#3049)
This change reduces the strain on the system by running the OS command through Freeswitch rather than directly from Lua. When running directly from Lua it causes RTP jitter in a high capacity system.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
--add the mkdir function
|
--add the mkdir function
|
||||||
function mkdir(dir)
|
function mkdir(dir)
|
||||||
|
api = freeswitch.API();
|
||||||
dir = dir:gsub([[\]], "/");
|
dir = dir:gsub([[\]], "/");
|
||||||
if (package.config:sub(1,1) == "/") then
|
if (package.config:sub(1,1) == "/") then
|
||||||
--unix
|
--unix
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
--windows
|
--windows
|
||||||
cmd = [[mkdir "]] .. dir .. [["]];
|
cmd = [[mkdir "]] .. dir .. [["]];
|
||||||
end
|
end
|
||||||
os.execute(cmd);
|
-- os.execute(cmd);
|
||||||
|
api:executeString("system " .. cmd );
|
||||||
return cmd;
|
return cmd;
|
||||||
end
|
end
|
||||||
Reference in New Issue
Block a user