isync

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

commit e585d400762758bef3fa60e16c3a3cdea7662794
parent acd674f93e94598420efe133e6da45349d6ee4e6
Author: Michael Elkins <me@mutt.org>
Date:   Wed, 27 Dec 2000 21:16:43 +0000

use imap_close to terminate a connection in imap_open()

Diffstat:
Mimap.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/imap.c b/imap.c @@ -619,7 +619,10 @@ imap_open (config_t * box, unsigned int minuid, imap_t * imap) { /* initialize SSL */ if (init_ssl (box)) - return 0; + { + ret = -1; + break; + } imap->sock->ssl = SSL_new (SSLContext); SSL_set_fd (imap->sock->ssl, imap->sock->fd); @@ -714,10 +717,7 @@ imap_open (config_t * box, unsigned int minuid, imap_t * imap) if (ret) { - imap_exec (imap, "LOGOUT"); - close (s); - free (imap->buf); - free (imap); + imap_close (imap); imap = 0; }