Improve ignoring of connections.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@20180 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2004-09-29 13:09:47 +00:00
parent b3b6e74592
commit d50f4ea8e6

View file

@ -826,11 +826,25 @@ unescapeData(const unsigned char* bytes, unsigned length, unsigned char *buf)
if ((h = [NSHost hostWithAddress: a]) == nil)
{
[self _alert: @"Unknown host (%@) on new connection.", a];
/*
* Don't log this in quiet mode as it could just be a
* test connection that we are ignoring.
*/
if ([_quiet containsObject: a] == NO)
{
[self _alert: @"Unknown host (%@) on new connection.", a];
}
}
else if (_hosts != nil && [_hosts containsObject: a] == NO)
{
[self _alert: @"Invalid host (%@) on new connection.", a];
/*
* Don't log this in quiet mode as it could just be a
* test connection that we are ignoring.
*/
if ([_quiet containsObject: a] == NO)
{
[self _alert: @"Invalid host (%@) on new connection.", a];
}
}
else if (_maxPerHost > 0 && [_perHost countForObject: a] >= _maxPerHost)
{
@ -838,7 +852,14 @@ unescapeData(const unsigned char* bytes, unsigned length, unsigned char *buf)
}
else if (_sslConfig != nil && [hdl sslAccept] == NO)
{
[self _alert: @"SSL accept fail on new connection (%@).", a];
/*
* Don't log this in quiet mode as it could just be a
* test connection that we are ignoring.
*/
if ([_quiet containsObject: a] == NO)
{
[self _alert: @"SSL accept fail on new connection (%@).", a];
}
}
else
{