diff options
author | Jeffrey Hutzelman <jhutz@cmu.edu> | 2013-01-04 16:33:59 -0500 |
---|---|---|
committer | Jeffrey Hutzelman <jhutz@cmu.edu> | 2013-02-17 22:34:40 -0500 |
commit | 3923d414d0408e2f33dff220c5964b36e28565ba (patch) | |
tree | 43c7518b25eb340cc1a41e6c4d017507ac893046 /server/zserver.h | |
parent | 854948b8a897cfc2791c8823922b4600668445b1 (diff) |
Make otherrealms be an array of pointers
The server keeps pointers to realms in non-ephemeral data structures, such
as triplet subscriber lists. Thus, we cannot move existing realms around
in memory without causing data corruption. However, dynamic reloading of
the realm.list means new realms can appear, which sooner or later will
mean reallocating the otherrealms array to make room for more realms.
Therefore, to allow otherrealms to be reallocated without changing the
addresses of existing realms, otherrealms is converted from an array of
realms to an array of pointers to realms.
Diffstat (limited to 'server/zserver.h')
-rw-r--r-- | server/zserver.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/zserver.h b/server/zserver.h index 6cefe5d..fc6f847 100644 --- a/server/zserver.h +++ b/server/zserver.h @@ -176,7 +176,7 @@ struct _Unacked { struct sockaddr_in addr; /* client address */ int srv_idx; /* index of server */ struct { - int rlm_idx; /* index of realm */ + ZRealm *realm; /* pointer to realm */ int rlm_srv_idx; /* index of server in realm */ } rlm; } dest; @@ -442,7 +442,7 @@ extern int nservers; /* number of other servers*/ extern String *empty; extern String *wildcard_instance; -extern ZRealm *otherrealms; +extern ZRealm **otherrealms; extern int nrealms; |