summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/ServerHandleImpl.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-08-18 08:49:39 +0200
committerMattes D <github@xoft.cz>2015-08-18 08:49:39 +0200
commit5ea1b9cee17d7fb43a2e118b880cbf74cd9772d7 (patch)
treeb14ae581e0680c303466781cc356c2399a6c7990 /src/OSSupport/ServerHandleImpl.cpp
parentMerge pull request #2436 from cuberite/UpdateCompileScript (diff)
parentSome warning fixes (diff)
downloadcuberite-5ea1b9cee17d7fb43a2e118b880cbf74cd9772d7.tar
cuberite-5ea1b9cee17d7fb43a2e118b880cbf74cd9772d7.tar.gz
cuberite-5ea1b9cee17d7fb43a2e118b880cbf74cd9772d7.tar.bz2
cuberite-5ea1b9cee17d7fb43a2e118b880cbf74cd9772d7.tar.lz
cuberite-5ea1b9cee17d7fb43a2e118b880cbf74cd9772d7.tar.xz
cuberite-5ea1b9cee17d7fb43a2e118b880cbf74cd9772d7.tar.zst
cuberite-5ea1b9cee17d7fb43a2e118b880cbf74cd9772d7.zip
Diffstat (limited to 'src/OSSupport/ServerHandleImpl.cpp')
-rw-r--r--src/OSSupport/ServerHandleImpl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/OSSupport/ServerHandleImpl.cpp b/src/OSSupport/ServerHandleImpl.cpp
index 6f0a1ee16..d1443757a 100644
--- a/src/OSSupport/ServerHandleImpl.cpp
+++ b/src/OSSupport/ServerHandleImpl.cpp
@@ -123,7 +123,7 @@ bool cServerHandleImpl::Listen(UInt16 a_Port)
// Set up the main socket:
// It should listen on IPv6 with IPv4 fallback, when available; IPv4 when IPv6 is not available.
bool NeedsTwoSockets = false;
- int err;
+ int err = 0;
evutil_socket_t MainSock = socket(AF_INET6, SOCK_STREAM, IPPROTO_TCP);
if (!IsValidSocket(MainSock))
@@ -271,6 +271,8 @@ bool cServerHandleImpl::Listen(UInt16 a_Port)
return true; // Report as success, the primary socket is working
}
+ UNUSED(err);
+
m_SecondaryConnListener = evconnlistener_new(cNetworkSingleton::Get().GetEventBase(), Callback, this, LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE, 0, SecondSock);
return true;
}