Commit 94742be8 authored by Antoine Cellerier's avatar Antoine Cellerier

Revert part of r22952 which broke commands of more than 1000 chars.

parent 786b6c4a
...@@ -464,19 +464,20 @@ while not vlc.should_die() do ...@@ -464,19 +464,20 @@ while not vlc.should_die() do
for _, client in pairs(read) do for _, client in pairs(read) do
local input = client:recv(1000) local input = client:recv(1000)
local done = false
if string.match(input,"\n$") then if string.match(input,"\n$") then
client.buffer = string.gsub(client.buffer..input,"\r?\n$","") client.buffer = string.gsub(client.buffer..input,"\r?\n$","")
done = true
elseif client.buffer == "" elseif client.buffer == ""
and ((client.type == host.client_type.stdio and input == "") and ((client.type == host.client_type.stdio and input == "")
or (client.type == host.client_type.net and input == "\004")) then or (client.type == host.client_type.net and input == "\004")) then
-- Caught a ^D -- Caught a ^D
client.buffer = "quit" client.buffer = "quit"
done = true
else else
client.buffer = client.buffer .. input client.buffer = client.buffer .. input
end end
if client.buffer == "" then if done then
client:send( client.env.prompt )
else
local cmd,arg = split_input(client.buffer) local cmd,arg = split_input(client.buffer)
client.buffer = "" client.buffer = ""
client:switch_status(host.status.write) client:switch_status(host.status.write)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment