[Libreoffice-commits] online.git: loolwsd/Connect.cpp

Tor Lillqvist tml at collabora.com
Mon Apr 18 18:32:55 UTC 2016


 loolwsd/Connect.cpp |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 5c0788254b14eda55266074563486f9eb02bc309
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Apr 18 21:09:36 2016 +0300

    Add "exit" command and comment syntax to input files for the 'connect' program

diff --git a/loolwsd/Connect.cpp b/loolwsd/Connect.cpp
index b7c5c70..8f64ff3 100644
--- a/loolwsd/Connect.cpp
+++ b/loolwsd/Connect.cpp
@@ -187,6 +187,18 @@ protected:
                 std::cout << "Sleeping " << sleepTime << " seconds" << std::endl;
                 Thread::sleep(sleepTime * 1000);
             }
+            else if (line == "exit")
+            {
+                // While hacking on LOOL and editing input files for this program back and forth it
+                // is a good idea to be able to add an enforced exit in the middle of the input
+                // file.
+                std::cout << "Exiting" << std::endl;
+                break;
+            }
+            else if (line.find("#") == 0)
+            {
+                // Also comments can be useful in input files for this program
+            }
             else
             {
                 std::cout << "Sending: '" << line << "'" << std::endl;


More information about the Libreoffice-commits mailing list