server now rejects clients that are not in the configuration.

added a protocol message to indicate this.
This commit is contained in:
crs
2002-05-31 18:18:29 +00:00
parent 1e8a5d7fa9
commit 793c968f00
6 changed files with 63 additions and 1 deletions

View File

@@ -294,6 +294,10 @@ void CClient::runSession(void*)
onErrorBusy();
break;
}
else if (memcmp(code, kMsgEUnknown, 4) == 0) {
onErrorUnknown();
break;
}
else if (memcmp(code, kMsgEBad, 4) == 0) {
onErrorBad();
break;
@@ -606,6 +610,11 @@ void CClient::onErrorBusy()
log((CLOG_ERR "server already has a connected client with name \"%s\"", m_name.c_str()));
}
void CClient::onErrorUnknown()
{
log((CLOG_ERR "server refused client with name \"%s\"", m_name.c_str()));
}
void CClient::onErrorBad()
{
log((CLOG_ERR "server disconnected due to a protocol error"));