summaryrefslogtreecommitdiff
path: root/server/server.c
diff options
context:
space:
mode:
authorGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-02-23 23:54:01 -0500
committerGravatar Jeffrey Hutzelman <jhutz@cmu.edu>2013-03-18 19:21:16 -0400
commit1e7b25b82c4461a40cf9589beccce5611df9de3a (patch)
tree99765918b063443d7211c001ccb5291c3aed93d0 /server/server.c
parent4f9ad057ca1391dac5d3ae3b35563185abae36e3 (diff)
Make ZRealm.srvrs be an array of pointers
With asynchronous name resolution and timers, we need to keep around pointers to individual other-realm servers. This, we cannot move existing servers around in memory without causing data corruption. But, realm_init() wants to reallocate the srvrs array for a realm when adding servers. Therefore, to allow ZRealm.srvrs to be reallocated without changing the addresses of existing servers, it is converted from an array of servers to an array of pointers to servers.
Diffstat (limited to 'server/server.c')
-rw-r--r--server/server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/server.c b/server/server.c
index 2983cf6..934c700 100644
--- a/server/server.c
+++ b/server/server.c
@@ -763,7 +763,7 @@ send_stats(struct sockaddr_in *who)
for (i = 0; i < nrealms ; i++) {
realm = otherrealms[i];
sprintf(buf, "%s(%s)/%s", realm->name,
- inet_ntoa((realm->srvrs[realm->idx].addr).sin_addr),
+ inet_ntoa((realm->srvrs[realm->idx]->addr).sin_addr),
rlm_states[(int) realm->state]);
responses[num_resp++] = strsave(buf);
}