]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/server/room_functions.c
Changed the arrangement of bytes in the universe
[citadel.git] / webcit-ng / server / room_functions.c
index b1135c3b6130fb60232f678ce4fde81e17938f52..8d8ca3bcc5113c670c5a48161a5b630a39d1a858 100644 (file)
@@ -101,17 +101,6 @@ void json_stat(struct http_transaction *h, struct ctdlsession *c) {
 }
 
 
-// remove this when finished
-void diag_hexdump_str(char *str, char *desc) {
-       printf("%s\n", desc);
-       FILE *fp = popen("hexdump -C", "w");
-       if (fp) {
-               fwrite(str, strlen(str), 1, fp);
-               pclose(fp);
-       }
-}
-
-
 // Client is requesting a mailbox summary of the current room
 void json_mailbox(struct http_transaction *h, struct ctdlsession *c) {
        char buf[1024];
@@ -122,7 +111,6 @@ void json_mailbox(struct http_transaction *h, struct ctdlsession *c) {
        ctdl_readline(c, buf, sizeof(buf));
        if (buf[0] == '1') {
                while (ctdl_readline(c, buf, sizeof(buf)), (strcmp(buf, "000"))) {
-                       diag_hexdump_str(buf, "line received from server");
                        JsonValue *jmsg = NewJsonObject(HKEY("message"));
                        JsonObjectAppend(jmsg, NewJsonNumber(HKEY("msgnum"), extract_long(buf, 0)));
                        JsonObjectAppend(jmsg, NewJsonNumber(HKEY("time"), extract_long(buf, 1)));
@@ -434,9 +422,10 @@ void propfind_the_room_itself(struct http_transaction *h, struct ctdlsession *c)
                if (msglist) {
                        int i;
                        for (i = 0; (msglist[i] > 0); ++i) {
-                               if ((i % 10) == 0)
+                               if ((i % 10) == 0) {
                                        syslog(LOG_DEBUG, "PROPFIND enumerated %d messages", i);
-                               e = NULL;       // EUID gets stored here
+                               }
+                               e = NULL;               // EUID gets stored here
                                timestamp = 0;
 
                                char cbuf[1024];