summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-29 19:27:07 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-29 19:27:07 +0100
commit025ee983d420a020e63831a93586d6f58e1d88a8 (patch)
tree505909ffb4ac3771cd454483e6d13696fc900060 /source
parentMineShafts: backup commit with initial work, still unusable. (diff)
downloadcuberite-025ee983d420a020e63831a93586d6f58e1d88a8.tar
cuberite-025ee983d420a020e63831a93586d6f58e1d88a8.tar.gz
cuberite-025ee983d420a020e63831a93586d6f58e1d88a8.tar.bz2
cuberite-025ee983d420a020e63831a93586d6f58e1d88a8.tar.lz
cuberite-025ee983d420a020e63831a93586d6f58e1d88a8.tar.xz
cuberite-025ee983d420a020e63831a93586d6f58e1d88a8.tar.zst
cuberite-025ee983d420a020e63831a93586d6f58e1d88a8.zip
Diffstat (limited to '')
-rw-r--r--source/OSSupport/ListenThread.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/OSSupport/ListenThread.cpp b/source/OSSupport/ListenThread.cpp
index 9e2a07f3c..706c820b4 100644
--- a/source/OSSupport/ListenThread.cpp
+++ b/source/OSSupport/ListenThread.cpp
@@ -108,8 +108,8 @@ bool cListenThread::CreateSockets(const AString & a_PortsString)
const char * FamilyStr = "";
switch (m_Family)
{
- case cSocket::IPv4: FamilyStr = "IPv4: "; break;
- case cSocket::IPv6: FamilyStr = "IPv6: "; break;
+ case cSocket::IPv4: FamilyStr = "IPv4"; break;
+ case cSocket::IPv6: FamilyStr = "IPv6"; break;
default:
{
ASSERT(!"Unknown address family");
@@ -122,13 +122,13 @@ bool cListenThread::CreateSockets(const AString & a_PortsString)
int Port = atoi(itr->c_str());
if ((Port <= 0) || (Port > 65535))
{
- LOGWARNING("Invalid port specified: \"%s\".", itr->c_str());
+ LOGWARNING("%s: Invalid port specified: \"%s\".", FamilyStr, itr->c_str());
continue;
}
m_Sockets.push_back(cSocket::CreateSocket(m_Family));
if (!m_Sockets.back().IsValid())
{
- LOGERROR("Cannot create listening socket for port %d: \"%s\"", Port, cSocket::GetLastErrorString().c_str());
+ LOGWARNING("%s: Cannot create listening socket for port %d: \"%s\"", FamilyStr, Port, cSocket::GetLastErrorString().c_str());
m_Sockets.pop_back();
continue;
}
@@ -137,7 +137,7 @@ bool cListenThread::CreateSockets(const AString & a_PortsString)
{
if (!m_Sockets.back().SetReuseAddress())
{
- LOG("Port %d cannot reuse addr, syscall failed: \"%s\".", Port, cSocket::GetLastErrorString().c_str());
+ LOG("%s: Port %d cannot reuse addr, syscall failed: \"%s\".", FamilyStr, Port, cSocket::GetLastErrorString().c_str());
}
}
@@ -155,19 +155,19 @@ bool cListenThread::CreateSockets(const AString & a_PortsString)
}
if (!res)
{
- LOGWARNING("Cannot bind port %d: \"%s\".", Port, cSocket::GetLastErrorString().c_str());
+ LOGWARNING("%s: Cannot bind port %d: \"%s\".", FamilyStr, Port, cSocket::GetLastErrorString().c_str());
m_Sockets.pop_back();
continue;
}
if (!m_Sockets.back().Listen())
{
- LOGWARNING("Cannot listen on port %d: \"%s\".", Port, cSocket::GetLastErrorString().c_str());
+ LOGWARNING("%s: Cannot listen on port %d: \"%s\".", FamilyStr, Port, cSocket::GetLastErrorString().c_str());
m_Sockets.pop_back();
continue;
}
- LOGINFO("%sPort %d is open for connections", FamilyStr, Port);
+ LOGINFO("%s: Port %d is open for connections", FamilyStr, Port);
} // for itr - Ports[]
return !(m_Sockets.empty());