]> code.citadel.org Git - citadel.git/blobdiff - webcit/roomops.c
* Rewrote the HTTP engine and application coupling to run in a worker thread
[citadel.git] / webcit / roomops.c
index bf47eaa509d18f57c955ccd05d5b70304771d88a..e4ec0bc72e701df27c3484aec9438b516f53da66 100644 (file)
@@ -1,15 +1,33 @@
 /* $Id$ */
 
+
+#include <ctype.h>
 #include <stdlib.h>
-#include <string.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #include <stdio.h>
+#include <fcntl.h>
 #include <signal.h>
 #include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <limits.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <string.h>
+#include <pwd.h>
+#include <errno.h>
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
 #include "webcit.h"
-#include "child.h"
+
+
+
+
+
+
+
 
 /*
  * This struct holds a list of rooms for <G>oto operations.
@@ -232,7 +250,7 @@ void list_all_rooms_by_floor(void)
 
        load_floorlist();
 
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
 
        wprintf("<TABLE width=100% border><TR><TH>Floor</TH>");
@@ -279,7 +297,7 @@ void list_all_rooms_by_floor(void)
  */
 void zapped_list(void)
 {
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=770000><TR><TD>");
        wprintf("<FONT FACE=\"Arial,Helvetica,sans-serif\" SIZE=+1 COLOR=\"FFFFFF\"");
@@ -391,7 +409,7 @@ void gotoroom(char *gname, int display_name)
 
 
        if (display_name) {
-               printf("HTTP/1.0 200 OK\n");
+               wprintf("HTTP/1.0 200 OK\n");
                 printf("Pragma: no-cache\n");
                 printf("Cache-Control: no-store\n");
                output_headers(0);
@@ -629,7 +647,7 @@ void display_editroom(void)
        er_floor = extract_int(&buf[4], 4);
 
 
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
 
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=000077><TR><TD>");
@@ -946,7 +964,7 @@ void display_entroom(void)
                display_error(&buf[4]);
                return;
        }
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
 
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=000077><TR><TD>");
@@ -1028,7 +1046,7 @@ void entroom(void)
 void display_private(char *rname, int req_pass)
 {
 
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
 
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=770000><TR><TD>");
@@ -1091,7 +1109,7 @@ void goto_private(void)
                display_private(bstr("gr_name"), 1);
                return;
        }
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
        wprintf("%s\n", &buf[4]);
        wDumpContent(1);
@@ -1104,7 +1122,7 @@ void goto_private(void)
  */
 void display_zap(void)
 {
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
 
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=770000><TR><TD>");
@@ -1171,7 +1189,7 @@ void confirm_delete_room(void)
                display_error(&buf[4]);
                return;
        }
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=770000><TR><TD>");
        wprintf("<FONT SIZE=+1 COLOR=\"FFFFFF\"");