CVS commit by ossi: move assigning default port to the place of use
M +5 -5 drv_imap.c 1.27 --- isync/src/drv_imap.c #1.26:1.27 @@ -1262,5 +1262,9 @@ imap_open_store( store_conf_t *conf, } else { memset( &addr, 0, sizeof(addr) ); - addr.sin_port = htons( srvc->port ); + addr.sin_port = htons( srvc->port ? srvc->port : +#ifdef HAVE_LIBSSL + srvc->use_imaps ? 993 : +#endif + 143 ); addr.sin_family = AF_INET; @@ -1716,6 +1720,4 @@ imap_parse_store( conffile_t *cfg, store server->use_sslv2 = 1; server->use_sslv3 = 1; - if (!server->port) - server->port = 993; } else #endif @@ -1723,6 +1725,4 @@ imap_parse_store( conffile_t *cfg, store if (!memcmp( "imap:", cfg->val, 5 )) cfg->val += 5; - if (!server->port) - server->port = 143; } if (!memcmp( "//", cfg->val, 2 )) ------------------------------------------------------- All the advantages of Linux Managed Hosting--Without the Cost and Risk! Fully trained technicians. The highest number of Red Hat certifications in the hosting industry. Fanatical Support. Click to learn more http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642 _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel