isync

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

commit 474923bc6b5788cd6974dc8b00dfc9cb8e5292e2
parent 71fce2a622b103f1b227e7154fb604d8659fbf5b
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sat, 23 Feb 2008 14:18:21 +0000

compat wrapper: don't crash if neither host nor tunnel are specified.
fixes:
CCMAIL: 449006@bugs.debian.org

Diffstat:
Msrc/compat/config.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/compat/config.c b/src/compat/config.c @@ -246,7 +246,7 @@ write_imap_server( FILE *fp, config_t *cfg ) if (cfg->tunnel) nfasprintf( (char **)&cfg->old_server_name, "tunnel%d", ++tunnels ); - else { + else if (cfg->host) { if (sscanf( cfg->host, "%d.%d.%d.%d", &a1, &a2, &a3, &a4 ) == 4) hl = nfsnprintf( buf, sizeof(buf), "%s", cfg->host ); else { @@ -270,6 +270,9 @@ write_imap_server( FILE *fp, config_t *cfg ) cfg->old_server_name = nfstrdup( buf ); cfg->old_servers = 1; gotsrv: ; + } else { + fprintf( stderr, "ERROR: Neither host nor tunnel specified for mailbox %s.\n", cfg->path ); + exit( 1 ); } if (cfg->user)