From 639575323070fadad9cc0e2687741e07c0d42cdd Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 10 Jan 2011 22:53:12 -0500 Subject: [PATCH] When we 503, do it in HTML Conflicts: webcit/webcit.c --- citadel/modules/wiki/serv_wiki.c | 3 ++- webcit/webcit.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/citadel/modules/wiki/serv_wiki.c b/citadel/modules/wiki/serv_wiki.c index abaa71e1f..5f1845757 100644 --- a/citadel/modules/wiki/serv_wiki.c +++ b/citadel/modules/wiki/serv_wiki.c @@ -422,7 +422,8 @@ void wiki_rev_callback(char *name, char *filename, char *partnum, char *disp, CtdlLogPrintf(CTDL_DEBUG, "callback found rev: %s\n", this_rev); /* Perform the patch */ - fp = popen("patch -f -s -p0 --global-reject-file=/dev/null >/dev/null 2>/dev/null", "w"); + //fp = popen("patch -f -s -p0 --global-reject-file=/dev/null >/dev/null 2>/dev/null", "w"); + fp = popen("patch -f -s -p0 --global-reject-file=/dev/null >/dev/null 2>>/tmp/patcherr.txt", "w"); if (fp) { /* Replace the filenames in the patch with the tempfilename we're actually tweaking */ fprintf(fp, "--- %s\n", hecbd->tempfilename); diff --git a/webcit/webcit.c b/webcit/webcit.c index a23482421..8f51833de 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -657,7 +657,17 @@ void session_loop(void) * connection now. */ if (!WCC->connected) { - if (GetConnected ()) + if (GetConnected()) { + hprintf("HTTP/1.1 503 Service Unavailable\r\n"); + hprintf("Content-Type: text/html\r\n"); + begin_burst(); + wc_printf("503 Service Unavailable\n"); + wc_printf(_("This program was unable to connect or stay " + "connected to the Citadel server. Please report " + "this problem to your system administrator.") + ); + wc_printf("\n"); + end_burst(); goto SKIP_ALL_THIS_CRAP; } -- 2.30.2