aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-07-06 17:20:56 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-07-06 17:20:56 +0000
commit2839f9ecb0c46aacff276e6087c77803bc00fafc (patch)
tree18d4cbf4735d9d568f73fd1d444080ee7899c2ae
parent4640f5541a1699ea3805e8a0801811201d9c24ef (diff)
downloadfetchmail-2839f9ecb0c46aacff276e6087c77803bc00fafc.tar.gz
fetchmail-2839f9ecb0c46aacff276e6087c77803bc00fafc.tar.bz2
fetchmail-2839f9ecb0c46aacff276e6087c77803bc00fafc.zip
Deal with the new logic for aetting lead_server.
svn path=/trunk/; revision=1153
-rw-r--r--driver.c7
1 files 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);
}