commit dff2f6a9f502312f39117e0ded14e6c95481fb64
Author: Oswald Buddenhagen <o...@users.sf.net>
Date:   Sat Feb 23 14:19:13 2008 +0000

    backport: compat wrapper: don't crash if neither host nor tunnel are
    specified.

 src/compat/config.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/compat/config.c b/src/compat/config.c
index 596c347..f87ca6f 100644
--- a/src/compat/config.c
+++ b/src/compat/config.c
@@ -252,7 +252,7 @@ write_imap_server( FILE *fp, config_t *cfg )
                if (sscanf( cfg->host, "%d.%d.%d.%d", &a1, &a2, &a3, &a4 ) == 4)
                        /* XXX this does not avoid clashes. add port? */
                        cfg->server_name = nfstrdup( cfg->host );
-               else {
+       else if (cfg->host) {
                        p = strrchr( cfg->host, '.' );
                        if (!p)
                                hl = nfsnprintf( buf, sizeof(buf), "%s", 
cfg->host );
@@ -271,6 +271,9 @@ write_imap_server( FILE *fp, config_t *cfg )
                        cfg->server_name = nfstrdup( buf );
                        cfg->servers = 1;
                  gotsrv: ;
+       } else {
+               fprintf( stderr, "ERROR: Neither host nor tunnel specified for 
mailbox %s.\n", cfg->path );
+               exit( 1 );
                }
                fprintf( fp, "IMAPAccount %s\n", cfg->server_name );
                if (cfg->use_imaps)

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to