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/realmnames.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/realmnames.c')
-rw-r--r-- | src/realmnames.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/realmnames.c b/src/realmnames.c index 77065bf..be57f8e 100644 --- a/src/realmnames.c +++ b/src/realmnames.c @@ -25,36 +25,36 @@ #include "realmnames.h" char* -get_realmname(ConfigurationT* config, int realm) +get_realmname(ServerConfiguration* config, int realm) { static char realmname[10]; - if (config->realmtable[realm].realmname == NULL) { + if (ServerRealm_get_realmName(ServerConfiguration_get_realmsTable(config)[realm]) == NULL) { memset(realmname, 0, 10); sprintf(realmname, "%d", realm); return realmname; } - return config->realmtable[realm].realmname; + return ServerRealm_get_realmName(ServerConfiguration_get_realmsTable(config)[realm]); } int -get_realmnumber(ConfigurationT* config, char* realmname) +get_realmnumber(ServerConfiguration* config, char* realmname) { int i; char guard; - for (i = 0; i < config->size; ++i) { - if (config->realmtable[i].realmname != NULL) { - if (strcmp(realmname, config->realmtable[i].realmname) == 0) { + for (i = 0; i < ServerConfiguration_get_realmsNumber(config); ++i) { + if (ServerRealm_get_realmName(ServerConfiguration_get_realmsTable(config)[i]) != NULL) { + if (strcmp(realmname, ServerRealm_get_realmName(ServerConfiguration_get_realmsTable(config)[i])) == 0) { return i; } } } if (sscanf(realmname, "%d%c", &i, &guard) == 1) { - if ((i >= 0) && (i < config->size)) { - if (config->realmtable[i].realmname == NULL) { + if ((i >= 0) && (i < ServerConfiguration_get_realmsNumber(config))) { + if (ServerRealm_get_realmName(ServerConfiguration_get_realmsTable(config)[i]) == NULL) { return i; } } |