| 400 | } |
| 401 | |
| 402 | static void socket_shutdown(struct imap_socket *sock) |
| 403 | { |
| 404 | #ifndef NO_OPENSSL |
| 405 | if (sock->ssl) { |
| 406 | SSL_shutdown(sock->ssl); |
| 407 | SSL_free(sock->ssl); |
| 408 | } |
| 409 | #endif |
| 410 | close(sock->fd[0]); |
| 411 | close(sock->fd[1]); |
| 412 | } |
| 413 | |
| 414 | /* simple line buffering */ |
| 415 | static int buffer_gets(struct imap_buffer *b, char **s) |