]> code.citadel.org Git - citadel.git/blobdiff - citadel/sysdep.c
* enable the watcher do differenciate between crash & regular exit, so he can send...
[citadel.git] / citadel / sysdep.c
index 359b4c33b7fa87c6ee91792525bfff922deef193..4cd22d0d5ca637463b7892c23aae916fc7147156 100644 (file)
@@ -566,13 +566,17 @@ static unsigned on = 1, off = 0;
 
 void buffer_output(void) {
 #ifdef HAVE_TCP_BUFFERING
-       setsockopt(CC->client_socket, IPPROTO_TCP, TCP_CORK, &on, 4);
+       if (!CC->redirect_ssl) {
+               setsockopt(CC->client_socket, IPPROTO_TCP, TCP_CORK, &on, 4);
+       }
 #endif
 }
 
 void unbuffer_output(void) {
 #ifdef HAVE_TCP_BUFFERING
-       setsockopt(CC->client_socket, IPPROTO_TCP, TCP_CORK, &off, 4);
+       if (!CC->redirect_ssl) {
+               setsockopt(CC->client_socket, IPPROTO_TCP, TCP_CORK, &off, 4);
+       }
 #endif
 }
 
@@ -960,7 +964,7 @@ void start_daemon(int unused) {
                if (WIFEXITED(status)) {
 
                        /* Exit code 0 means the watcher should exit */
-                       if (WEXITSTATUS(status) == 0) {
+                       if (WEXITSTATUS(status) == CTDLEXIT_SHUTDOWN) {
                                do_restart = 0;
                        }