RSS: Update debugging messages
authorMichael Hampton <io_error@uncensored.citadel.org>
Fri, 19 Aug 2005 01:58:06 +0000 (01:58 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Fri, 19 Aug 2005 01:58:06 +0000 (01:58 +0000)
webcit/fmt_date.c
webcit/rss.c

index 4481063f88c1e134e7a22a5e86c78156958fb394..da9c1d160806c6e62fe9364529e0e6771c4972ef 100644 (file)
@@ -158,7 +158,6 @@ time_t httpdate_to_timestamp(const char *buf)
        char *c;
        char tz[256];
 
-lprintf(3, "Datestamp: %s\n", buf);
        /* Skip day of week, to number */
        for (c = buf; *c != ' '; c++)
                ;
index 0d131873c28f3850f873d5dd637bd4119cec5622..253e201ebb252198448c80f4f970661e75989a28 100644 (file)
@@ -43,19 +43,21 @@ void display_rss(const char *roomname)
        }
 
        if (gotoroom(roomname)) {
+               lprintf(3, "RSS: Can't goto requested room\n");
                wprintf("HTTP/1.0 404 Not Found\r\n");
                wprintf("Content-Type: text/html\r\n");
                wprintf("\r\n");
-               wprintf("Error retrieving RSS feed: couldn't find room or messages\n");
+               wprintf("Error retrieving RSS feed: couldn't find room\n");
                return;
        }
 
        nummsgs = load_msg_ptrs("MSGS LAST|15", 0);
        if (nummsgs == 0) {
+               lprintf(3, "RSS: No messages found\n");
                wprintf("HTTP/1.0 404 Not Found\r\n");
                wprintf("Content-Type: text/html\r\n");
                wprintf("\r\n");
-               wprintf("Error retrieving RSS feed: couldn't find room or messages\n");
+               wprintf("Error retrieving RSS feed: couldn't find messages\n");
                return;
        }
 
@@ -75,8 +77,8 @@ void display_rss(const char *roomname)
                }
        }
 
-       lprintf(3, "If modified since %ld Last modified %ld\n", if_modified_since, now);
        if (if_modified_since > 0 && if_modified_since > now) {
+               lprintf(3, "RSS: Feed not updated since the last time you looked\n");
                wprintf("HTTP/1.0 304 Not Modified\r\n");
                wprintf("Last-Modified: %s\r\n", date);
                now = time(NULL);
@@ -89,6 +91,7 @@ void display_rss(const char *roomname)
        }
 
        /* Do RSS header */
+       lprintf(3, "RSS: Yum yum! This feed is tasty!\n");
        wprintf("HTTP/1.0 200 OK\r\n");
        wprintf("Last-Modified: %s\r\n", date);
 /*     if (*msgn) wprintf("ETag: %s\r\n\r\n", msgn); */