Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
fdcdeaa3
Commit
fdcdeaa3
authored
Jun 19, 2011
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*.lua: handle recv() returning nil
parent
f52a83cc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletion
+2
-1
share/lua/intf/cli.lua
share/lua/intf/cli.lua
+1
-1
share/lua/intf/modules/host.lua
share/lua/intf/modules/host.lua
+1
-0
No files found.
share/lua/intf/cli.lua
View file @
fdcdeaa3
...
...
@@ -787,7 +787,7 @@ while not vlc.misc.should_die() do
for
_
,
client
in
pairs
(
read
)
do
local
input
=
client
:
recv
(
1000
)
if
input
==
nil
or
input
==
""
-- the telnet client program has left
if
input
==
nil
-- the telnet client program has left
or
((
client
.
type
==
host
.
client_type
.
net
or
client
.
type
==
host
.
client_type
.
telnet
)
and
input
==
"
\004
"
)
then
...
...
share/lua/intf/modules/host.lua
View file @
fdcdeaa3
...
...
@@ -52,6 +52,7 @@ Example use:
-- handle clients in read mode
for _, client in pairs(read) do
local str = client:recv(1000)
if not str then break end
str = string.gsub(str,"\r?\n$","")
client.buffer = "Got `"..str.."'.\r\n"
client:switch_status( host.status.write )
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment