Commit 1b67e3a6 authored by Denis Charmet's avatar Denis Charmet Committed by Rémi Duraffort

Fix lua telnet vlm_message_to_string

In the current lua vlm implementation, messages can have value xor
children but not both. But the "show media" command gives media a
value : ( %d broadcast - %d vod ) and children (if any). (cf
src/input/vlmshell.c:1502)
Signed-off-by: default avatarRémi Duraffort <ivoire@videolan.org>
parent 2241aa22
......@@ -100,7 +100,7 @@ static void push_message( lua_State *L, vlm_message_t *message )
}
lua_setfield( L, -2, "children" );
}
else
if ( message->psz_value )
{
lua_pushstring( L, message->psz_value );
lua_setfield( L, -2, "value" );
......
......@@ -78,15 +78,13 @@ function vlm_message_to_string(client,message,prefix)
local prefix = prefix or ""
if message.value then
client:append(prefix .. message.name .. " : " .. message.value)
return
else
client:append(prefix .. message.name)
if message.children then
for i,c in ipairs(message.children) do
vlm_message_to_string(client,c,prefix.." ")
end
end
if message.children then
for i,c in ipairs(message.children) do
vlm_message_to_string(client,c,prefix.." ")
end
return
end
end
......
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