diff options
author | Jakub Sławiński | 2005-11-03 20:37:56 +0100 |
---|---|---|
committer | Joshua Judson Rosen | 2014-07-17 21:15:00 +0200 |
commit | 63bbc710b23893742e5ccbd430f95bf2d29c2da6 (patch) | |
tree | 06d0585724cff8a4f1a7c052b5b89fd12c404094 /src/server_find.c | |
parent | v0.7.2 (diff) | |
download | apf-63bbc710b23893742e5ccbd430f95bf2d29c2da6.tar.gz |
v0.7.4
- Fixed: sockets in CLOSE_WAIT state left by afclient
- Added: --localname and --localport options
- Added: --localdesname option
- Added: kicking user in 'opening' state
- Fixed: info about kicked user
- Fixed: TERM signal handling
- Fixed: id lost after reconnection
- Fixed: printing wrong client name in 'SSL_accept failed (timeout)' message
- Fixed: ignored 'certificate' and 'key' options from config file
- Added: config files for afclient
- Modified: some options in afserver config file
Diffstat (limited to 'src/server_find.c')
-rw-r--r-- | src/server_find.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server_find.c b/src/server_find.c index 73cb9ba..ca4e143 100644 --- a/src/server_find.c +++ b/src/server_find.c @@ -23,17 +23,17 @@ #include "server_find.h" int -find_client(RealmT* ptr, char mode, int usrclipair) +find_client(ServerRealm* ptr, char mode, int usrclipair) { int i; switch(mode) { case 1: { /* fill first client before go to next */ - for (i = 0; i < ptr->clinum; ++i) { - if ((ConnectClient_get_state(ptr->clitable[i]) == + for (i = 0; i < ServerRealm_get_clientsLimit(ptr); ++i) { + if ((ConnectClient_get_state(ServerRealm_get_clientsTable(ptr)[i]) == CONNECTCLIENT_STATE_ACCEPTED) && - (ConnectClient_get_usrCliPair(ptr->clitable[i]) == usrclipair)) { - if (ConnectClient_get_connected(ptr->clitable[i]) < - ConnectClient_get_limit(ptr->clitable[i])) { + (ConnectClient_get_usrCliPair(ServerRealm_get_clientsTable(ptr)[i]) == usrclipair)) { + if (ConnectClient_get_connected(ServerRealm_get_clientsTable(ptr)[i]) < + ConnectClient_get_limit(ServerRealm_get_clientsTable(ptr)[i])) { return i; } } |