diff options
author | Jeffrey Hutzelman <jhutz@cmu.edu> | 2013-02-02 09:22:07 -0500 |
---|---|---|
committer | Jeffrey Hutzelman <jhutz@cmu.edu> | 2013-02-17 22:34:40 -0500 |
commit | f4ba8a876fe6f2d0a009362b7fa230ceb545379c (patch) | |
tree | 41ce0a891f8348d32248374d769e8bcc586ad3c9 | |
parent | 9cc65a8ada2ad50d41409f1d24eb4ffb881bd492 (diff) |
Dewarn realm.list enhancements
-rw-r--r-- | server/realm.c | 10 | ||||
-rw-r--r-- | server/zserver.h | 1 |
2 files changed, 5 insertions, 6 deletions
diff --git a/server/realm.c b/server/realm.c index ecec745..3bc72ff 100644 --- a/server/realm.c +++ b/server/realm.c @@ -117,9 +117,7 @@ realm_get_idx_by_addr(ZRealm *realm, } static int -realm_next_idx_by_idx(realm, idx) - ZRealm *realm; - int idx; +realm_next_idx_by_idx(ZRealm *realm, int idx) { ZRealm_server *srvr; int a, b; @@ -128,7 +126,7 @@ realm_next_idx_by_idx(realm, idx) srvr = realm->srvrs; a = idx; while (a > 0) { a--; srvr++; } - for (srvr, b = idx; b < realm->count; b++, srvr++) { + for (b = idx; b < realm->count; b++, srvr++) { if (!is_usable(srvr)) continue; if (!srvr->dontsend) @@ -385,12 +383,12 @@ realm_get_realm_by_name(char *name) } ZRealm * -realm_get_realm_by_name_string(String *z) +realm_get_realm_by_name_string(String *namestr) { int a; for (a = 0; a < nrealms; a++) - if (otherrealms[a]->namestr == z) + if (otherrealms[a]->namestr == namestr) return otherrealms[a]; return 0; diff --git a/server/zserver.h b/server/zserver.h index ae509ab..5249f86 100644 --- a/server/zserver.h +++ b/server/zserver.h @@ -369,6 +369,7 @@ int realm_sender_in_realm(const char *realm, char *sender); int realm_bound_for_realm(const char *realm, char *recip); ZRealm *realm_which_realm(struct sockaddr_in *who); ZRealm *realm_get_realm_by_name(char *name); +ZRealm *realm_get_realm_by_name_string(String *namestr); ZRealm *realm_get_realm_by_pid(int); void realm_handoff(ZNotice_t *, int, struct sockaddr_in *, ZRealm *, int); const char *realm_expand_realm(char *); |