]> granicus.if.org Git - icinga2/commitdiff
Fix livestatus keepalive handling
authorJohannes Meyer <johannes.meyer@netways.de>
Thu, 12 Dec 2013 09:21:33 +0000 (10:21 +0100)
committerJohannes Meyer <johannes.meyer@netways.de>
Thu, 12 Dec 2013 09:21:33 +0000 (10:21 +0100)
fixes #5314

components/livestatus/query.cpp

index 91bb244cd8faa1c77a90595e1d4e294396768b3d..ede5a981c5e30c523c01e90e6dddf9a76c36ff41 100644 (file)
@@ -85,6 +85,7 @@ Query::Query(const std::vector<String>& lines, const String& compat_log_path)
        m_Verb = verb;
 
        if (m_Verb == "COMMAND") {
+               m_KeepAlive = true;
                m_Command = target;
        } else if (m_Verb == "GET") {
                m_Table = target;
@@ -113,6 +114,8 @@ Query::Query(const std::vector<String>& lines, const String& compat_log_path)
                        m_ResponseHeader = params;
                else if (header == "OutputFormat")
                        m_OutputFormat = params;
+               else if (header == "KeepAlive")
+                       m_KeepAlive = (params == "on");
                else if (header == "Columns")
                        boost::algorithm::split(m_Columns, params, boost::is_any_of(" "));
                else if (header == "Separators")