Compiles.
This commit is contained in:
1 parent
43489e5b3a
commit
b16e2e1a1b
18 files changed
+43
-50
No files matched your search
+15
-4
@@ -32,8 +32,11 @@ namespace core {
|
||||
}
|
||||
|
||||
TCPSession * TCPServer::accept() {
|
||||
TCPSession *session = getSocketAccept(ePoll);
|
||||
session->setDescriptor(::accept(getDescriptor(), (struct sockaddr *)&session->ipAddress.addr, &session->ipAddress.addressLength));
|
||||
|
||||
try {
|
||||
|
||||
TCPSession *session = getSocketAccept(ePoll);
|
||||
session->setDescriptor(::accept(getDescriptor(), (struct sockaddr *)&session->ipAddress.addr, &session->ipAddress.addressLength));
|
||||
// if(blackList && blackList->contains(session->ipAddress.getClientAddress())) {
|
||||
// session->shutdown();
|
||||
// Log(LOG_WARN) << "Client at IP address " << session->ipAddress.getClientAddress() << " is blacklisted and was denied a connection.";
|
||||
@@ -44,8 +47,16 @@ namespace core {
|
||||
// Log(LOG_WARN) << "Client at IP address " << session->ipAddress.getClientAddress() << " is not authorized and was denied a connection.";
|
||||
// return NULL;
|
||||
// }
|
||||
coreutils::Log(coreutils::LOG_DEBUG_2) << "Session started on socket " << session->getDescriptor() << ".";
|
||||
return session;
|
||||
coreutils::Log(coreutils::LOG_DEBUG_2) << "Session started on socket " << session->getDescriptor() << ".";
|
||||
return session;
|
||||
}
|
||||
catch(coreutils::Exception e) {
|
||||
coreutils::Log(coreutils::LOG_EXCEPT) << "Major error on session initialization. Error is '" << e.text << "'.";
|
||||
}
|
||||
catch(...) {
|
||||
coreutils::Log(coreutils::LOG_EXCEPT) << "Unnspecified error on session initialization.";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void TCPServer::removeFromSessionList(TCPSession *session) {
|
||||
|
||||
Reference in new issue
Block a user