From 93f524ba6875c6d008b8d8824dc6a35e7c13e3a9 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 20 Nov 1996 03:42:38 +0000 Subject: We can dump server aliases now. svn path=/trunk/; revision=565 --- fetchmail.c | 10 +++++++++- rcfile_y.y | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/fetchmail.c b/fetchmail.c index a3a734be..ebb2b899 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -533,7 +533,6 @@ static int load_params(int argc, char **argv, int optind) } /* similarly, compute server leaders for queries */ - ctl->aka = (struct idlist *)NULL; for (mp = querylist; mp && mp != ctl; mp = mp->next) if (strcmp(mp->servername, ctl->servername) == 0) { @@ -676,6 +675,15 @@ void dump_params (struct query *ctl) if (ctl->canonical_name) printf(" Canonical DNS name of server is %s.\n", ctl->canonical_name); #endif /* HAVE_GETHOSTBYNAME */ + if (ctl->aka) + { + struct idlist *idp; + + printf(" Predeclared mailserver aliases:"); + for (idp = ctl->aka; idp; idp = idp->next) + printf(" %s", idp->id); + putchar('\n'); + } if (ctl->skip || outlevel == O_VERBOSE) printf(" This host will%s be queried when no host is specified.\n", ctl->skip ? " not" : ""); diff --git a/rcfile_y.y b/rcfile_y.y index 075c85a7..d22efa44 100644 --- a/rcfile_y.y +++ b/rcfile_y.y @@ -329,6 +329,7 @@ void optmerge(struct query *h2, struct query *h1) /* merge two options records; empty fields in h2 are filled in from h1 */ { append_uid_list(&h2->localnames, &h1->localnames); + append_uid_list(&h2->aka, &h1->aka); #define STR_MERGE(fld, len) if (*(h2->fld) == '\0') strcpy(h2->fld, h1->fld) STR_MERGE(remotename, USERNAMELEN); -- cgit v1.2.3