diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-07-05 19:08:18 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-07-05 19:08:18 +0000 |
commit | 4640f5541a1699ea3805e8a0801811201d9c24ef (patch) | |
tree | aa5c89f92e5d1426386f71faefbf1c13eadd16d3 /rcfile_y.y | |
parent | 3fdc882c9627f13b63eb087c71e96caf045da05d (diff) | |
download | fetchmail-4640f5541a1699ea3805e8a0801811201d9c24ef.tar.gz fetchmail-4640f5541a1699ea3805e8a0801811201d9c24ef.tar.bz2 fetchmail-4640f5541a1699ea3805e8a0801811201d9c24ef.zip |
Allow duplicate hostnames again.
svn path=/trunk/; revision=1152
Diffstat (limited to 'rcfile_y.y')
-rw-r--r-- | rcfile_y.y | 23 |
1 files changed, 15 insertions, 8 deletions
@@ -36,6 +36,8 @@ int yydebug; /* in case we didn't generate with -- debug */ static struct query current; /* current server record */ static int prc_errflag; +static struct hostdata *leadentry; +static bool trailer; static void record_current(); static void user_reset(); @@ -334,13 +336,7 @@ const bool securecheck; /* check for a secure rc file? */ static int reset_server(char *name, int skip) /* clear the entire global record and initialize it with a new name */ { - struct query *ctl; - - /* don't allow name collisions, this screws up the data structures */ - for (ctl = querylist; ctl; ctl = ctl->next) - if (strcmp(name, ctl->server.names->id) == 0) - return(FALSE); - + trailer = FALSE; memset(¤t,'\0',sizeof(current)); current.smtp_socket = -1; save_str(¤t.server.names, -1, name); @@ -350,7 +346,7 @@ static int reset_server(char *name, int skip) static void user_reset(void) -/* clear the global current record (server parameters) used by the parser */ +/* clear the global current record (user parameters) used by the parser */ { struct hostdata save; @@ -386,6 +382,15 @@ struct query *init; /* pointer to block containing initial values */ else querylist = node; /* list is empty */ hosttail = node; + + if (trailer) + node->server.lead_server = leadentry; + else + { + node->server.lead_server = NULL; + leadentry = &node->server; + } + return(node); } @@ -431,6 +436,8 @@ static void record_current(void) #undef FLAG_FORCE (void) hostalloc(¤t); + + trailer = TRUE; } void optmerge(struct query *h2, struct query *h1) |