]> granicus.if.org Git - icinga2/commitdiff
livestatus: rename address to host (same as ido)
authorMichael Friedrich <michael.friedrich@netways.de>
Mon, 29 Jul 2013 09:18:41 +0000 (11:18 +0200)
committerMichael Friedrich <michael.friedrich@netways.de>
Mon, 29 Jul 2013 09:18:41 +0000 (11:18 +0200)
refs #2762

components/livestatus/component.cpp
components/livestatus/component.h
components/livestatus/livestatus-type.conf

index dbaef39e37f7c75b13d931f412d82efe40c62dd8..317fbced59df632479eff5a3689283ce7548ae91 100644 (file)
@@ -41,7 +41,7 @@ LivestatusComponent::LivestatusComponent(const Dictionary::Ptr& serializedUpdate
 {
        RegisterAttribute("socket_type", Attribute_Config, &m_SocketType);
        RegisterAttribute("socket_path", Attribute_Config, &m_SocketPath);
-       RegisterAttribute("address", Attribute_Config, &m_Address);
+       RegisterAttribute("host", Attribute_Config, &m_Host);
        RegisterAttribute("port", Attribute_Config, &m_Port);
 }
 
@@ -52,7 +52,7 @@ void LivestatusComponent::Start(void)
 {
        if (GetSocketType() == "tcp") {
                TcpSocket::Ptr socket = boost::make_shared<TcpSocket>();
-               socket->Bind(GetAddress(), GetPort(), AF_INET);
+               socket->Bind(GetHost(), GetPort(), AF_INET);
 
                boost::thread thread(boost::bind(&LivestatusComponent::ServerThreadProc, this, socket));
                thread.detach();
@@ -90,9 +90,9 @@ String LivestatusComponent::GetSocketPath(void) const
                return socketPath;
 }
 
-String LivestatusComponent::GetAddress(void) const
+String LivestatusComponent::GetHost(void) const
 {
-       Value node = m_Address;
+       Value node = m_Host;
        if (node.IsEmpty())
                return "127.0.0.1";
        else
index a39a8f967fb8c612a0f6695111422bf1fedcb957..ad74c3829b32e222fe7721f359b6aba90fca72c6 100644 (file)
@@ -42,7 +42,7 @@ public:
 
        String GetSocketType(void) const;
        String GetSocketPath(void) const;
-       String GetAddress(void) const;
+       String GetHost(void) const;
        String GetPort(void) const;
 
        static int GetClientsConnected(void);
@@ -51,7 +51,7 @@ public:
 private:
        Attribute<String> m_SocketType;
        Attribute<String> m_SocketPath;
-       Attribute<String> m_Address;
+       Attribute<String> m_Host;
        Attribute<String> m_Port;
 
        void ServerThreadProc(const Socket::Ptr& server);
index 4403bcb24130bbb7107844cc31505fdf4a6e6b27..2d2a03d4f0d29df558383b9ea00a9307b4bb1b2d 100644 (file)
@@ -21,6 +21,6 @@ type LivestatusComponent {
        %attribute string "socket_type",
 
        %attribute string "socket_path",
-       %attribute string "address",
+       %attribute string "host",
        %attribute string "port",
 }