isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 09f08e4974aab8b8913de0125e81978ad9bf84c4
parent 5d5e07eb63b37dba7c37715c44dcbb4518af5b9b
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Wed, 18 May 2022 19:08:55 +0200

stop parsing config lines after invalid keyword

otherwise we may pointlessly complain about excess tokens.

Diffstat:
Msrc/config.c | 3+++
Msrc/driver.c | 1+
Msrc/drv_imap.c | 1+
3 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/config.c b/src/config.c @@ -475,6 +475,7 @@ load_config( const char *where ) } else if (!getopt_helper( &cfile, &cops, channel )) { error( "%s:%d: keyword '%s' is not recognized in Channel sections\n", cfile.file, cfile.line, cfile.cmd ); + cfile.rest = NULL; cfile.err = 1; } } @@ -522,6 +523,7 @@ load_config( const char *where ) } else { error( "%s:%d: keyword '%s' is not recognized in Group sections\n", cfile.file, cfile.line, cfile.cmd ); + cfile.rest = NULL; cfile.err = 1; } } @@ -550,6 +552,7 @@ load_config( const char *where ) error( "%s:%d: '%s' is not a recognized section-starting or global keyword\n", cfile.file, cfile.line, cfile.cmd ); cfile.err = 1; + cfile.rest = NULL; while (getcline( &cfile )) if (!cfile.cmd) goto reloop; diff --git a/src/driver.c b/src/driver.c @@ -77,6 +77,7 @@ parse_generic_store( store_conf_t *store, conffile_t *cfg, const char *type ) store->flat_delim = nfstrdup( cfg->val ); } else { error( "%s:%d: keyword '%s' is not recognized in %s sections\n", cfg->file, cfg->line, cfg->cmd, type ); + cfg->rest = NULL; cfg->err = 1; } } diff --git a/src/drv_imap.c b/src/drv_imap.c @@ -3704,6 +3704,7 @@ imap_parse_store( conffile_t *cfg, store_conf_t **storep ) } else { error( "%s:%d: keyword '%s' is not recognized in IMAPAccount sections\n", cfg->file, cfg->line, cfg->cmd ); + cfg->rest = NULL; cfg->err = 1; continue; }