|
|
@ -619,7 +619,10 @@ imap_open (config_t * box, unsigned int minuid, imap_t * imap) |
|
|
|
{ |
|
|
|
{ |
|
|
|
/* initialize SSL */ |
|
|
|
/* initialize SSL */ |
|
|
|
if (init_ssl (box)) |
|
|
|
if (init_ssl (box)) |
|
|
|
return 0; |
|
|
|
{ |
|
|
|
|
|
|
|
ret = -1; |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
imap->sock->ssl = SSL_new (SSLContext); |
|
|
|
imap->sock->ssl = SSL_new (SSLContext); |
|
|
|
SSL_set_fd (imap->sock->ssl, imap->sock->fd); |
|
|
|
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) |
|
|
|
if (ret) |
|
|
|
{ |
|
|
|
{ |
|
|
|
imap_exec (imap, "LOGOUT"); |
|
|
|
imap_close (imap); |
|
|
|
close (s); |
|
|
|
|
|
|
|
free (imap->buf); |
|
|
|
|
|
|
|
free (imap); |
|
|
|
|
|
|
|
imap = 0; |
|
|
|
imap = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|