[vlc-commits] Lua: CLI: exit cleanly

Rémi Denis-Courmont git at videolan.org
Sun Jun 16 16:47:04 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 16 17:39:02 2013 +0300| [cb3f5dd2cbea194801c37cda5a6debbed796f7a9] | committer: Rémi Denis-Courmont

Lua: CLI: exit cleanly

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cb3f5dd2cbea194801c37cda5a6debbed796f7a9
---

 share/lua/intf/cli.lua |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/share/lua/intf/cli.lua b/share/lua/intf/cli.lua
index 27e7efa..5af1e73 100644
--- a/share/lua/intf/cli.lua
+++ b/share/lua/intf/cli.lua
@@ -67,6 +67,8 @@ strip = common.strip
 _ = vlc.gettext._
 N_ = vlc.gettext.N_
 
+running = true
+
 --[[ Setup default environement ]]
 env = { prompt = "> ";
         width = 70;
@@ -158,6 +160,7 @@ function shutdown(name,client)
     h:broadcast("Shutting down.\r\n")
     vlc.msg.info("Requested shutdown.")
     vlc.misc.quit()
+    running = false
 end
 
 function quit(name,client)
@@ -784,7 +787,7 @@ h:listen( config.hosts or config.host or "*console" )
 password = config.password or "admin"
 
 --[[ The main loop ]]
-while true do
+while running do
     local write, read = h:accept_and_select()
 
     for _, client in pairs(write) do



More information about the vlc-commits mailing list