MAKE WEBCIT GREAT AGAIN!
authorArt Cancro <ajc@citadel.org>
Fri, 5 Jan 2018 22:23:54 +0000 (17:23 -0500)
committerArt Cancro <ajc@citadel.org>
Fri, 5 Jan 2018 22:23:54 +0000 (17:23 -0500)
19 files changed:
webcit-ng/admin_functions.c
webcit-ng/caldav_reports.c
webcit-ng/ctdl_commands.c
webcit-ng/ctdlclient.c
webcit-ng/ctdlfunctions.c
webcit-ng/html2html.c
webcit-ng/http.c
webcit-ng/main.c
webcit-ng/messages.c
webcit-ng/request.c
webcit-ng/room_functions.c
webcit-ng/ssl.c
webcit-ng/static.c
webcit-ng/tcp_sockets.c
webcit-ng/text2html.c
webcit-ng/threaded_view.c
webcit-ng/util.c
webcit-ng/webcit.h
webcit-ng/webserver.c

index 6071dcacc66ab33e5d567fa1c5725a2e6c1cf228..dbd3eca9576983e76021a6d9f1e9fc0c5bd7f34c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Admin functions
  *
- * Copyright (c) 1996-2017 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -32,7 +32,7 @@ void try_login(struct http_transaction *h, struct ctdlsession *c)
        snprintf(buf, sizeof buf, "%s:%s", username, password);
        CtdlEncodeBase64(auth, buf, strlen(buf), 0);
 
-       syslog(LOG_DEBUG, "try_login(username='%s',password=(%d bytes))", username, strlen(password));
+       syslog(LOG_DEBUG, "try_login(username='%s',password=(%d bytes))", username, (int)strlen(password));
 
        ctdl_printf(c, "LOUT");                                                 // log out, in case we were logged in
        ctdl_readline(c, buf, sizeof(buf));                                     // ignore the result
index b34581a0ca903bf6caa2246e10abe181f1982701..74980518ee41d32ff3027755cb7b126c946362e7 100644 (file)
@@ -2,7 +2,7 @@
  * This file contains functions which handle all of the CalDAV "REPORT" queries
  * specified in RFC4791 section 7.
  *
- * Copyright (c) 2016 by the citadel.org team
+ * Copyright (c) 2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -171,7 +171,7 @@ StrBuf *fetch_ical(struct ctdlsession *c, long msgnum)
  * Called by caldav_report() to output a single item.
  * Our policy is to throw away the list of properties the client asked for, and just send everything.
  */
-caldav_response(struct http_transaction *h, struct ctdlsession *c, StrBuf *ReportOut, StrBuf *ThisHref)
+void caldav_response(struct http_transaction *h, struct ctdlsession *c, StrBuf *ReportOut, StrBuf *ThisHref)
 {
        long msgnum;
        StrBuf *Caldata = NULL;
index 64193556b760e369c07ef1a3e5bddb403b4ee1f6..2017c908be4f9b1565af0a1c88db6217cb174776 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
index b6f204aad49b2fefb2dc34be703210dc0edbf265..a75d18a02eb25cb08e9973e16df07593cc7b45e9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Functions that handle communication with a Citadel Server
  *
- * Copyright (c) 1987-2016 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -28,7 +28,7 @@ int ctdl_readline(struct ctdlsession *ctdl, char *buf, int maxbytes)
        int len = 0;
        int c = 0;
 
-       if (buf == NULL) return;
+       if (buf == NULL) return(-1);
 
        while (len < maxbytes) {
                c = read(ctdl->sock, &buf[len], 1);
index 9c16ded02128a7a521886115604b5d2070bf27d3..cba9747e24777b9dd8e8b7764cb9a69643ce3a44 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * These utility functions loosely make up a Citadel protocol client library.
  *
- * Copyright (c) 2016 by the citadel.org team
+ * Copyright (c) 2016-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
index f7db44db9475f5d7ef71aa635c9e9c37fb5befaf..8e118e694c7945b198737565655c029c313c6664 100644 (file)
@@ -2,7 +2,7 @@
  * Output an HTML message, modifying it slightly to make sure it plays nice
  * with the rest of our web framework.
  *
- * Copyright (c) 2005-2017 by the citadel.org team
+ * Copyright (c) 2005-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 3.
index 0749a21a1380f50b8fc0b5fc8e1e3159238567c0..a7df9715638bfc81577016ae485a9233ccc45941 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This module handles HTTP transactions.
  *
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version 3.
index 69f4ecad8cb30f93867e020af95a800f6eb8a466..4270d3c5d3151ef7a7209bab9e95108ba7cd02d1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Main entry point for the program.
  *
- * Copyright (c) 1996-2017 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -105,7 +105,7 @@ int main(int argc, char **argv)
 
        /* Tell 'em who's in da house */
        syslog(LOG_NOTICE, "MAKE WEBCIT GREAT AGAIN!");
-       syslog(LOG_NOTICE, "Copyright (C) 1996-2017 by the citadel.org team");
+       syslog(LOG_NOTICE, "Copyright (C) 1996-2018 by the citadel.org team");
        syslog(LOG_NOTICE, " ");
        syslog(LOG_NOTICE, "This program is open source software: you can redistribute it and/or");
        syslog(LOG_NOTICE, "modify it under the terms of the GNU General Public License, version 3.");
index 3b9f096498d94c9f35ff63d5dd77a34d31dfed7f..fa0ada03d4d012007b95f2ec723865c98fa764af 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Message base functions
  *
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -269,7 +269,7 @@ void download_mime_component(struct http_transaction *h, struct ctdlsession *c,
        do {
                thisblock = read(c->sock, &h->response_body[bytes], (h->response_body_length - bytes));
                bytes += thisblock;
-               syslog(LOG_DEBUG, "Bytes read: %d of %d", bytes, h->response_body_length);
+               syslog(LOG_DEBUG, "Bytes read: %d of %d", (int)bytes, (int)h->response_body_length);
        } while ((bytes < h->response_body_length) && (thisblock >= 0));
        h->response_body[h->response_body_length] = 0;                          // null terminate it just for good measure
        syslog(LOG_DEBUG, "content type: %s", content_type);
index 186b2ac66065c9200f44893e69af15f33a343b63..c182a2912b065a547e127fb0fa5495271e4d67fc 100644 (file)
@@ -5,7 +5,7 @@
  * and pass control back down to the HTTP layer to output the response back to
  * the client.
  *
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
index 4d166e320310d490739cff37a110b9bd555bc223..dc4551ae573cd2c2482a1b17ba88534cd59cfaa6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Room functions
  *
- * Copyright (c) 1996-2017 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
index 05d62de6ad8fefc7b2ba0d3111e019212c982dd3..f0e24e671072c165f48ae28a1cc9b53c98ad0cab 100644 (file)
@@ -2,7 +2,7 @@
  * Functions in this module handle SSL encryption when WebCit is running
  * as an HTTPS server.
  *
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software.  You can redistribute it and/or
  * modify it under the terms of the GNU General Public License, version 3.
index 5508abae7446d76e3a4dfb830e6a9ea7aa48f2c7..207cbabdb634c4f9be9f4b9b7c9baea09ca71260 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Output static content
  *
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
index 55899bb04e470df7233cd0dc6fac514df26d4a34..767582eb2ebd3478639c1931d7f057a24b930ac2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * TCP sockets layer
  *
- * Copyright (c) 1987-2016 by the citadel.org team
+ * Copyright (c) 1987-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
index 708d3e1ca159e93ac9e95298eb123c23215cecc3..bffb90e8811c50461017760fdf4c892cd53ab395 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Convert text/plain to text/html
  *
- * Copyright (c) 2017 by the citadel.org team
+ * Copyright (c) 2017-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 3.
@@ -119,4 +119,3 @@ StrBuf *variformat2html(StrBuf *Source)
 }
 
 
-
index 07d689c24727b45254cc00b80fff43465cb16aee..12c70b60dd657340bfdf06d840757f837e857b14 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Threaded message view
  *
- * Copyright (c) 1996-2017 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
index 9fdf58a644ee0c3e6bb2ef7018bae54127708e3a..6d0c69d6223139459cc9e9a249a760f875499e5d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Utility functions
  *
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
index 1eae0ca10ed37a406818ade9a9a660964564a8b1..8dfcf71164fba0c1d2ed0512374b2fb5ea504edf 100644 (file)
@@ -152,8 +152,12 @@ StrBuf *html2html(const char *supplied_charset, int treat_as_wiki, char *roomnam
 void download_mime_component(struct http_transaction *h, struct ctdlsession *c, long msgnum, char *partnum);
 StrBuf *text2html(const char *supplied_charset, int treat_as_wiki, char *roomname, long msgnum, StrBuf *Source);
 StrBuf *variformat2html(StrBuf *Source);
-
-void *mallok(size_t size);
-void phree(void *ptr);
-void *reallok(void *ptr, size_t size);
-
+int ctdl_readline(struct ctdlsession *ctdl, char *buf, int maxbytes);
+void ctdl_c(struct http_transaction *h, struct ctdlsession *c);
+int webserver(char *webserver_interface, int webserver_port, int webserver_protocol);
+void ctdl_printf(struct ctdlsession *ctdl, const char *format,...);
+int webcit_tcp_server(const char *ip_addr, int port_number, int queue_len);
+void do_502(struct http_transaction *h);
+void do_404(struct http_transaction *h);
+void do_412(struct http_transaction *h);
+void UrlizeText(StrBuf* Target, StrBuf *Source, StrBuf *WrkBuf);
index 1a0776c8237d2b83ec920b219139f2a079f25bd7..25b87ec106feb44974a2790390350107f7bd2399 100644 (file)
@@ -5,7 +5,7 @@
  * connections, and dispatching active connections onto a pool of worker
  * threads.
  *
- * Copyright (c) 1996-2016 by the citadel.org team
+ * Copyright (c) 1996-2018 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.