From 5167626c92e4b0d4cbc0f660ef1bc64a1f7a3408 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Mon, 29 Jul 2013 11:18:41 +0200 Subject: [PATCH] livestatus: rename address to host (same as ido) refs #2762 --- components/livestatus/component.cpp | 8 ++++---- components/livestatus/component.h | 4 ++-- components/livestatus/livestatus-type.conf | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/livestatus/component.cpp b/components/livestatus/component.cpp index dbaef39e3..317fbced5 100644 --- a/components/livestatus/component.cpp +++ b/components/livestatus/component.cpp @@ -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(); - 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 diff --git a/components/livestatus/component.h b/components/livestatus/component.h index a39a8f967..ad74c3829 100644 --- a/components/livestatus/component.h +++ b/components/livestatus/component.h @@ -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 m_SocketType; Attribute m_SocketPath; - Attribute m_Address; + Attribute m_Host; Attribute m_Port; void ServerThreadProc(const Socket::Ptr& server); diff --git a/components/livestatus/livestatus-type.conf b/components/livestatus/livestatus-type.conf index 4403bcb24..2d2a03d4f 100644 --- a/components/livestatus/livestatus-type.conf +++ b/components/livestatus/livestatus-type.conf @@ -21,6 +21,6 @@ type LivestatusComponent { %attribute string "socket_type", %attribute string "socket_path", - %attribute string "address", + %attribute string "host", %attribute string "port", } -- 2.40.0