From 49ff374f565b46d63678d1ea92eba436eacaa8cc Mon Sep 17 00:00:00 2001 From: Jeffrey Hutzelman Date: Sat, 5 Jan 2013 15:29:16 -0500 Subject: Abstract realm server usability test Whether a particular server is usable currently depends only on whether we have successfully obtained its IP address. However, eventually it will also depend on additional factors such as whether the server has been deleted from the realm.list. To ease that transition, replace the 'usable' flag with a 'got_addr' flag (which is set when the address lookup succeeds), and add a new function to test whether a server is usable. --- server/zserver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/zserver.h') diff --git a/server/zserver.h b/server/zserver.h index fc6f847..ecdd06e 100644 --- a/server/zserver.h +++ b/server/zserver.h @@ -114,8 +114,8 @@ struct _Destlist { struct _ZRealm_server { String *name; /* server's hostname */ struct sockaddr_in addr; /* server's address */ - unsigned int usable :1; /* set once entry is usable */ unsigned int dontsend :1; /* private server, do not send */ + unsigned int got_addr :1; /* IP address is valid */ }; struct _ZRealm { -- cgit v1.2.3