From 2839f9ecb0c46aacff276e6087c77803bc00fafc Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 6 Jul 1997 17:20:56 +0000 Subject: Deal with the new logic for aetting lead_server. svn path=/trunk/; revision=1153 --- driver.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/driver.c b/driver.c index 3c9742b9..756021b1 100644 --- a/driver.c +++ b/driver.c @@ -110,6 +110,9 @@ static int is_host_alias(const char *name, struct query *ctl) struct hostent *he; struct mxentry *mxp, *mxrecords; + struct hostdata *lead_server = + ctl->server.lead_server ? ctl->server.lead_server : &ctl->server; + /* * The first two checks are optimizations that will catch a good * many cases. (1) check against the hostname the user @@ -126,7 +129,7 @@ static int is_host_alias(const char *name, struct query *ctl) * name doesn't match either is it time to call the bind library. * If this happens odds are good we're looking at an MX name. */ - if (str_in_list(&ctl->server.lead_server->names, name)) + if (str_in_list(&lead_server->names, name)) return(TRUE); else if (strcmp(name, ctl->server.canonical_name) == 0) return(TRUE); @@ -200,7 +203,7 @@ static int is_host_alias(const char *name, struct query *ctl) } /* add this name to relevant server's `also known as' list */ - save_str(&ctl->server.lead_server->names, -1, name); + save_str(&lead_server->names, -1, name); return(TRUE); } -- cgit v1.2.3