livestatus: rename address to host (same as ido)

refs #2762
This commit is contained in:
Michael Friedrich 2013-07-29 11:18:41 +02:00
parent f72d73f719
commit 5167626c92
3 changed files with 7 additions and 7 deletions

View 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

View 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);

View File

@ -21,6 +21,6 @@ type LivestatusComponent {
%attribute string "socket_type",
%attribute string "socket_path",
%attribute string "address",
%attribute string "host",
%attribute string "port",
}