| changeset 805: | 6425257af963 |
|---|---|
| parent 804: | a4d8ecf6392f |
| child 806: | eb32f2b7d2e7 |
| author: | Simon Horman <horms@verge.net.au> |
| date: | Thu Apr 29 00:13:46 2010 +1000 (4 months ago) |
| files: | perdition/perdition.c |
| description: | core: Send a BYE to clients if a timeout occurs This is specified in draft-ietf-sieve-managesieve-09.txt and currently only managesieve implements the bye callback. Signed-off-by: Simon Horman <horms@verge.net.au> |
1--- a/perdition/perdition.c Thu Apr 29 00:13:46 2010 +1000 2+++ b/perdition/perdition.c Thu Apr 29 00:13:46 2010 +1000 3@@ -1020,9 +1020,14 @@ 4 io_set_timeout(server_io, opt.timeout); 5 if(io_pipe(server_io, client_io, buffer, BUFFER_SIZE, 6 &bytes_written, &bytes_read, &auth_log)<0){ 7- if (io_get_err(client_io) == io_err_timeout) 8+ if (io_get_err(client_io) == io_err_timeout) { 9 VANESSA_LOGGER_INFO("Timeout piping data."); 10- else { 11+ if (protocol->bye && protocol->bye(client_io, "Timeout") < 0) { 12+ VANESSA_LOGGER_DEBUG("protocol->bye timeout"); 13+ VANESSA_LOGGER_ERR("Fatal error writing to client. Exiting child."); 14+ perdition_exit_cleanly(-1); 15+ } 16+ } else { 17 VANESSA_LOGGER_DEBUG("vanessa_socket_pipe"); 18 VANESSA_LOGGER_ERR("Fatal error piping data. Exiting child."); 19 perdition_exit_cleanly(-1);