Renamed all groupdav_() functions to dav_()
authorArt Cancro <ajc@uncensored.citadel.org>
Mon, 14 Nov 2011 16:05:21 +0000 (11:05 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 5 Dec 2011 21:57:50 +0000 (22:57 +0100)
webcit/dav.h
webcit/dav_delete.c
webcit/dav_get.c
webcit/dav_main.c
webcit/dav_options.c
webcit/dav_propfind.c
webcit/dav_put.c
webcit/roomviews.c
webcit/subst.c
webcit/webcit.c

index a974087..63d67df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Data passed back and forth between groupdav_get() and its
+ * Data passed back and forth between dav_get() and its
  * callback functions called by the MIME parser
  */
 struct epdata {
@@ -10,20 +10,20 @@ struct epdata {
 };
 
 
-void groupdav_common_headers(void);
-void groupdav_main(void);
-void groupdav_get(void);
-void groupdav_put(void);
-void groupdav_delete(void);
-void groupdav_propfind(void);
-void groupdav_options(void);
+void dav_common_headers(void);
+void dav_main(void);
+void dav_get(void);
+void dav_put(void);
+void dav_delete(void);
+void dav_propfind(void);
+void dav_options(void);
 
 long locate_message_by_uid(const char *);
-void groupdav_folder_list(void);
+void dav_folder_list(void);
 void euid_escapize(char *, const char *);
 void euid_unescapize(char *, const char *);
-void groupdav_identify_host(void);
-void groupdav_identify_hosthdr(void);
+void dav_identify_host(void);
+void dav_identify_hosthdr(void);
 
 void RegisterDAVNamespace(const char * UrlString, 
                          long UrlSLen, 
index 7966f9c..126eade 100644 (file)
@@ -26,7 +26,7 @@
 /*
  * The pathname is always going to be /groupdav/room_name/euid
  */
-void groupdav_delete(void) 
+void dav_delete(void) 
 {
        wcsession *WCC = WC;
        char dav_uid[SIZ];
@@ -53,7 +53,7 @@ void groupdav_delete(void)
        }
        if (strcasecmp(ChrPtr(WC->CurRoom.name), ChrPtr(dav_roomname))) {
                hprintf("HTTP/1.1 404 not found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Length: 0\r\n\r\n");
                begin_burst();
                end_burst();
@@ -68,7 +68,7 @@ void groupdav_delete(void)
         */
        if (dav_msgnum < 0L) {
                hprintf("HTTP/1.1 404 Not Found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Length: 0\r\n\r\n");
                begin_burst();
                end_burst();
@@ -83,7 +83,7 @@ void groupdav_delete(void)
        if (StrLength(WCC->Hdr->HR.dav_ifmatch) > 0) {
                if (StrTol(WCC->Hdr->HR.dav_ifmatch) != dav_msgnum) {
                        hprintf("HTTP/1.1 412 Precondition Failed\r\n");
-                       groupdav_common_headers();
+                       dav_common_headers();
                        hprintf("Content-Length: 0\r\n\r\n");
                        begin_burst();
                        end_burst();
@@ -99,14 +99,14 @@ void groupdav_delete(void)
        serv_getln(buf, sizeof buf);
        if (buf[0] == '2') {
                hprintf("HTTP/1.1 204 No Content\r\n"); /* success */
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Length: 0\r\n\r\n");
                begin_burst();
                end_burst();
        }
        else {
                hprintf("HTTP/1.1 403 Forbidden\r\n");  /* access denied */
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Length: 0\r\n\r\n");
                begin_burst();
                end_burst();
index b222554..178b0c3 100644 (file)
  * Fetch the entire contents of the room as one big ics file.
  * This is for "webcal://" type access.
  */    
-void groupdav_get_big_ics(void) {
+void dav_get_big_ics(void) {
        char buf[1024];
 
        serv_puts("ICAL getics");
        serv_getln(buf, sizeof buf);
        if (buf[0] != '1') {
                hprintf("HTTP/1.1 404 not found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
                begin_burst();
                wc_printf("%s\r\n",
@@ -45,7 +45,7 @@ void groupdav_get_big_ics(void) {
        }
 
        hprintf("HTTP/1.1 200 OK\r\n");
-       groupdav_common_headers();
+       dav_common_headers();
        hprintf("Content-type: text/calendar; charset=UTF-8\r\n");
        begin_burst();
        while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
@@ -56,7 +56,7 @@ void groupdav_get_big_ics(void) {
 
 
 /* 
- * MIME parser callback function for groupdav_get()
+ * MIME parser callback function for dav_get()
  * Helps identify the relevant section of a multipart message
  */
 void extract_preferred(char *name, char *filename, char *partnum, char *disp,
@@ -101,7 +101,7 @@ void extract_preferred(char *name, char *filename, char *partnum, char *disp,
  * /groupdav/room_name/euid    (GroupDAV)
  * /groupdav/room_name         (webcal)
  */
-void groupdav_get(void)
+void dav_get(void)
 {
        wcsession *WCC = WC;
        StrBuf *dav_roomname;
@@ -122,7 +122,7 @@ void groupdav_get(void)
 
        if (StrBufNum_tokens(WCC->Hdr->HR.ReqLine, '/') < 2) {
                hprintf("HTTP/1.1 404 not found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
                wc_printf("The object you requested was not found.\r\n");
                end_burst();
@@ -144,7 +144,7 @@ void groupdav_get(void)
        }
        if (strcasecmp(ChrPtr(WCC->CurRoom.name), ChrPtr(dav_roomname))) {
                hprintf("HTTP/1.1 404 not found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
                wc_printf("There is no folder called \"%s\" on this server.\r\n",
                        ChrPtr(dav_roomname));
@@ -157,7 +157,7 @@ void groupdav_get(void)
        /** GET on the collection itself returns an ICS of the entire collection.
         */
        if (StrLength(dav_uid) == 0) {
-               groupdav_get_big_ics();
+               dav_get_big_ics();
                FreeStrBuf(&dav_roomname);
                FreeStrBuf(&dav_uid);
                return;
@@ -168,7 +168,7 @@ void groupdav_get(void)
        serv_getln(buf, sizeof buf);
        if (buf[0] != '1') {
                hprintf("HTTP/1.1 404 not found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
                wc_printf("Object \"%s\" was not found in the \"%s\" folder.\r\n",
                        ChrPtr(dav_uid),
@@ -229,7 +229,7 @@ void groupdav_get(void)
        /* Output headers common to single or multi part messages */
 
        hprintf("HTTP/1.1 200 OK\r\n");
-       groupdav_common_headers();
+       dav_common_headers();
        hprintf("etag: \"%ld\"\r\n", dav_msgnum);
        hprintf("Date: %s\r\n", date);
 
index 97fcc9d..93e114c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Entry point for GroupDAV functions
  *
- * Copyright (c) 2005-2010 by the citadel.org team
+ * Copyright (c) 2005-2011 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 as published by
@@ -34,7 +34,7 @@ HashList *DavNamespaces = NULL;
  * do our own header stuff here.
  *
  */
-void groupdav_common_headers(void) {
+void dav_common_headers(void) {
        hprintf(
                "Server: %s / %s\r\n"
                "Connection: close\r\n",
@@ -100,13 +100,12 @@ void euid_unescapize(char *target, const char *source) {
 /*
  * Main entry point for GroupDAV requests
  */
-void groupdav_main(void)
+void dav_main(void)
 {
        wcsession *WCC = WC;
        int i, len;
 
        StrBufUnescape(WCC->Hdr->HR.ReqLine, 0);
-
        StrBufStripSlashes(WCC->Hdr->HR.ReqLine, 0);
 
        /*
@@ -139,7 +138,7 @@ void groupdav_main(void)
         * other variants of DAV in the future.
         */
        case eOPTIONS:
-               groupdav_options();
+               dav_options();
                break;
 
 
@@ -148,28 +147,28 @@ void groupdav_main(void)
         * room, or to list all relevant rooms on the server.
         */
        case ePROPFIND:
-               groupdav_propfind();
+               dav_propfind();
                break;
 
        /*
         * The GET method is used for fetching individual items.
         */
        case eGET:
-               groupdav_get();
+               dav_get();
                break;
        
        /*
         * The PUT method is used to add or modify items.
         */
        case ePUT:
-               groupdav_put();
+               dav_put();
                break;
        
        /*
         * The DELETE method kills, maims, and destroys.
         */
        case eDELETE:
-               groupdav_delete();
+               dav_delete();
                break;
        default:
 
@@ -177,7 +176,7 @@ void groupdav_main(void)
         * Couldn't find what we were looking for.  Die in a car fire.
         */
                hprintf("HTTP/1.1 501 Method not implemented\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
                wc_printf("GroupDAV method \"%s\" is not implemented.\r\n",
                        ReqStrs[WCC->Hdr->HR.eReqType]);
@@ -189,7 +188,7 @@ void groupdav_main(void)
 /*
  * Output our host prefix for globally absolute URL's.
  */  
-void groupdav_identify_host(void) {
+void dav_identify_host(void) {
        wc_printf("%s", ChrPtr(site_prefix));
 }
 
@@ -202,7 +201,7 @@ void tmplput_dav_HOSTNAME(StrBuf *Target, WCTemplputParams *TP)
 /*
  * Output our host prefix for globally absolute URL's.
  */  
-void groupdav_identify_hosthdr(void) {
+void dav_identify_hosthdr(void) {
        hprintf("%s", ChrPtr(site_prefix));
 }
 
@@ -328,20 +327,18 @@ void
 InitModule_GROUPDAV
 (void)
 {
-/*
-       WebcitAddUrlHandler(HKEY("groupdav"), "", 0, groupdav_main, XHTTP_COMMANDS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);
- */
        RegisterDAVNamespace(HKEY("groupdav"), HKEY("GroupDAV"), 
-                            groupdav_main, GroupdavDispatchREST, 
-                            XHTTP_COMMANDS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE);
+                            dav_main, GroupdavDispatchREST, 
+                            XHTTP_COMMANDS|COOKIEUNNEEDED|FORCE_SESSIONCLOSE
+       );
 
-       RegisterNamespace("DAV:HOSTNAME", 0, 0, tmplput_davHOSTNAME, NULL, CTX_NONE);
+       RegisterNamespace("DAV:HOSTNAME", 0, 0, tmplput_dav_HOSTNAME, NULL, CTX_NONE);
 
        RegisterConditional(HKEY("COND:DAV:NS"), 0, Conditional_DAV_NS,  CTX_NONE);
 
        RegisterIterator("DAV:NS", 0, DavNamespaces, NULL, 
-                        NULL, NULL, CTX_DAVNS, CTX_NONE, IT_NOFLAG);
-
+                        NULL, NULL, CTX_DAVNS, CTX_NONE, IT_NOFLAG
+       );
 
        RegisterConditional(HKEY("COND:DAV:NSCURRENT"), 0, Conditional_DAV_NSCURRENT,  CTX_DAVNS);
        RegisterNamespace("DAV:NAMESPACE", 0, 1, tmplput_DAV_NAMESPACE, NULL, CTX_NONE);
index 96dffd3..b5f35ab 100644 (file)
@@ -25,7 +25,7 @@
 /*
  * The pathname is always going to be /groupdav/room_name/msg_num
  */
-void groupdav_options(void)
+void dav_options(void)
 {
        wcsession *WCC = WC;
        StrBuf *dav_roomname;
@@ -47,7 +47,7 @@ void groupdav_options(void)
         */
        if (StrLength(dav_roomname) == 0) {
                hprintf("HTTP/1.1 200 OK\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Date: %s\r\n", datestring);
                hprintf("DAV: 1\r\n");
                hprintf("Allow: OPTIONS, PROPFIND\r\n");
@@ -66,7 +66,7 @@ void groupdav_options(void)
 
        if (strcasecmp(ChrPtr(WC->CurRoom.name), ChrPtr(dav_roomname))) {
                hprintf("HTTP/1.1 404 not found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Date: %s\r\n", datestring);
                hprintf(
                        "Content-Type: text/plain\r\n");
@@ -89,7 +89,7 @@ void groupdav_options(void)
                dav_msgnum = locate_message_by_uid(ChrPtr(dav_uid));
                if (dav_msgnum < 0) {
                        hprintf("HTTP/1.1 404 not found\r\n");
-                       groupdav_common_headers();
+                       dav_common_headers();
                        hprintf("Content-Type: text/plain\r\n");
                        begin_burst();
                        wc_printf(
@@ -103,7 +103,7 @@ void groupdav_options(void)
                }
 
                hprintf("HTTP/1.1 200 OK\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Date: %s\r\n", datestring);
                hprintf("DAV: 1\r\n");
                hprintf("Allow: OPTIONS, PROPFIND, GET, PUT, DELETE\r\n");
@@ -123,7 +123,7 @@ void groupdav_options(void)
         * an OPTIONS on the room itself.
         */
        hprintf("HTTP/1.1 200 OK\r\n");
-       groupdav_common_headers();
+       dav_common_headers();
        hprintf("Date: %s\r\n", datestring);
        hprintf("DAV: 1\r\n");
        hprintf("Allow: OPTIONS, PROPFIND, GET, PUT\r\n");
index ce659b1..ebf6670 100644 (file)
@@ -257,7 +257,7 @@ long GotoRestRoom(HashList *SubRooms)
  * List rooms (or "collections" in DAV terminology) which contain
  * interesting groupware objects.
  */
-void groupdav_collection_list(void)
+void dav_collection_list(void)
 {
        wcsession *WCC = WC;
        char buf[256];
@@ -287,7 +287,7 @@ void groupdav_collection_list(void)
         * everything we know about.  Let the client sort it out.
         */
        hprintf("HTTP/1.0 207 Multi-Status\r\n");
-       groupdav_common_headers();
+       dav_common_headers();
        hprintf("Date: %s\r\n", datestring);
        hprintf("Content-type: text/xml\r\n");
        if (DisableGzip || (!WCC->Hdr->HR.gzip_ok))     
@@ -305,7 +305,7 @@ void groupdav_collection_list(void)
        if (starting_point == 0) {
                wc_printf("<response>");
                        wc_printf("<href>");
-                               groupdav_identify_host();
+                               dav_identify_host();
                                wc_printf("/");
                        wc_printf("</href>");
                        wc_printf("<propstat>");
@@ -327,7 +327,7 @@ void groupdav_collection_list(void)
        if ((starting_point + WCC->Hdr->HR.dav_depth) >= 1) {
                wc_printf("<response>");
                        wc_printf("<href>");
-                               groupdav_identify_host();
+                               dav_identify_host();
                                wc_printf("/groupdav");
                        wc_printf("</href>");
                        wc_printf("<propstat>");
@@ -383,7 +383,7 @@ void groupdav_collection_list(void)
                        wc_printf("<response>");
 
                        wc_printf("<href>");
-                       groupdav_identify_host();
+                       dav_identify_host();
                        wc_printf("/groupdav/");
                        urlescputs(roomname);
                        wc_printf("/</href>");
@@ -436,12 +436,8 @@ void groupdav_collection_list(void)
 /*
  * The pathname is always going to be /groupdav/room_name/msg_num
  */
-void groupdav_propfind(void) 
+void dav_propfind(void) 
 {
-#ifdef DEV_RESTDAV
-       HashList *SubRooms = NULL;
-       long State;
-#endif
        wcsession *WCC = WC;
        StrBuf *dav_roomname;
        StrBuf *dav_uid;
@@ -463,64 +459,13 @@ void groupdav_propfind(void)
        dav_uid = NewStrBuf();
        StrBufExtract_token(dav_roomname, WCC->Hdr->HR.ReqLine, 0, '/');
        StrBufExtract_token(dav_uid, WCC->Hdr->HR.ReqLine, 1, '/');
-#ifdef DEV_RESTDAV
-       /*
-        * If the room name is blank, the client is requesting a
-        * folder list.
-        */
-       SubRooms = NewHash(1, Flathash);
-       State = GotoRestRoom(SubRooms);
-       if (((State & REST_IN_ROOM) == 0) ||
-           (((State & (REST_GOT_LOCAL_PART)) == 0) &&
-            (WCC->Hdr->HR.dav_depth == 0)))
-       {
-               now = time(NULL);
-               http_datestring(datestring, sizeof datestring, now);
-
-               /*
-                * Be rude.  Completely ignore the XML request and simply send them
-                * everything we know about.  Let the client sort it out.
-                */
-               hprintf("HTTP/1.0 207 Multi-Status\r\n");
-               groupdav_common_headers();
-               hprintf("Date: %s\r\n", datestring);
-               hprintf("Content-type: text/xml\r\n");
-               if (DisableGzip || (!WCC->Hdr->HR.gzip_ok))     
-                       hprintf("Content-encoding: identity\r\n");
-
-               begin_burst();
-
-
-               /*
-                * If the client is requesting the root, show a root node.
-                */
-               do_template("dav_propfind_top");
-               end_burst();
-               FreeStrBuf(&dav_roomname);
-               FreeStrBuf(&dav_uid);
-               FreeHashList(&SubRooms);
-               return;
-       }
-
-       if ((State & (REST_GOT_LOCAL_PART)) == 0) {
-               readloop(headers, eReadEUIDS);
-               FreeHashList(&SubRooms);
-               return;
-
-       }
-
-
-       
-       FreeHashList(&SubRooms);
-
-#endif
 
        /*
         * If the room name is blank, the client is requesting a
         * folder list.
         */
        if (StrLength(dav_roomname) == 0) {
-               groupdav_collection_list();
+               dav_collection_list();
                FreeStrBuf(&dav_roomname);
                FreeStrBuf(&dav_uid);
                return;
@@ -532,7 +477,7 @@ void groupdav_propfind(void)
        }
        if (strcasecmp(ChrPtr(WCC->CurRoom.name), ChrPtr(dav_roomname))) {
                hprintf("HTTP/1.1 404 not found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Date: %s\r\n", datestring);
                hprintf("Content-Type: text/plain\r\n");
                wc_printf("There is no folder called \"%s\" on this server.\r\n",
@@ -553,7 +498,7 @@ void groupdav_propfind(void)
                dav_msgnum = locate_message_by_uid(ChrPtr(dav_uid));
                if (dav_msgnum < 0) {
                        hprintf("HTTP/1.1 404 not found\r\n");
-                       groupdav_common_headers();
+                       dav_common_headers();
                        hprintf("Content-Type: text/plain\r\n");
                        wc_printf("Object \"%s\" was not found in the \"%s\" folder.\r\n",
                                ChrPtr(dav_uid),
@@ -570,7 +515,7 @@ void groupdav_propfind(void)
                 * nothing else).  Let the client-side parser sort it out.
                 */
                hprintf("HTTP/1.0 207 Multi-Status\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Date: %s\r\n", datestring);
                hprintf("Content-type: text/xml\r\n");
                if (DisableGzip || (!WCC->Hdr->HR.gzip_ok))     
@@ -585,7 +530,7 @@ void groupdav_propfind(void)
                wc_printf("<response>");
                
                wc_printf("<href>");
-               groupdav_identify_host();
+               dav_identify_host();
                wc_printf("/groupdav/");
                urlescputs(ChrPtr(WCC->CurRoom.name));
                euid_escapize(encoded_uid, ChrPtr(dav_uid));
@@ -621,7 +566,7 @@ void groupdav_propfind(void)
         * nothing else).  Let the client-side parser sort it out.
         */
        hprintf("HTTP/1.0 207 Multi-Status\r\n");
-       groupdav_common_headers();
+       dav_common_headers();
        hprintf("Date: %s\r\n", datestring);
        hprintf("Content-type: text/xml\r\n");
        if (DisableGzip || (!WCC->Hdr->HR.gzip_ok))     
@@ -638,7 +583,7 @@ void groupdav_propfind(void)
        wc_printf("<response>");
 
        wc_printf("<href>");
-       groupdav_identify_host();
+       dav_identify_host();
        wc_printf("/groupdav/");
        urlescputs(ChrPtr(WCC->CurRoom.name));
        wc_printf("</href>");
@@ -710,7 +655,7 @@ void groupdav_propfind(void)
                if (!IsEmptyStr(uid)) {
                        wc_printf("<response>");
                                wc_printf("<href>");
-                                       groupdav_identify_host();
+                                       dav_identify_host();
                                        wc_printf("/groupdav/");
                                        urlescputs(ChrPtr(WCC->CurRoom.name));
                                        euid_escapize(encoded_uid, uid);
index 4052f58..e2a29d1 100644 (file)
@@ -28,7 +28,7 @@
  * component.  This would be for webcal:// 'publish' operations, not
  * for GroupDAV.
  */
-void groupdav_put_bigics(void)
+void dav_put_bigics(void)
 {
        wcsession *WCC = WC;
        char buf[1024];
@@ -44,7 +44,7 @@ void groupdav_put_bigics(void)
        serv_getln(buf, sizeof buf);
        if (buf[0] != '4') {
                hprintf("HTTP/1.1 502 Bad Gateway\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-type: text/plain\r\n");
                begin_burst();
                wc_printf("%s\r\n", &buf[4]);
@@ -58,7 +58,7 @@ void groupdav_put_bigics(void)
        /* Report success and not much else. */
        hprintf("HTTP/1.1 204 No Content\r\n");
        syslog(9, "HTTP/1.1 204 No Content\r\n");
-       groupdav_common_headers();
+       dav_common_headers();
        begin_burst();
        end_burst();
 }
@@ -70,7 +70,7 @@ void groupdav_put_bigics(void)
  * [/groupdav/]room_name/euid  (GroupDAV)
  * [/groupdav/]room_name               (webcal)
  */
-void groupdav_put(void) 
+void dav_put(void) 
 {
        wcsession *WCC = WC;
        StrBuf *dav_roomname;
@@ -82,7 +82,7 @@ void groupdav_put(void)
 
        if (StrBufNum_tokens(WCC->Hdr->HR.ReqLine, '/') < 2) {
                hprintf("HTTP/1.1 404 not found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
                begin_burst();
                wc_printf("The object you requested was not found.\r\n");
@@ -105,7 +105,7 @@ void groupdav_put(void)
        }
        if (strcasecmp(ChrPtr(WC->CurRoom.name), ChrPtr(dav_roomname))) {
                hprintf("HTTP/1.1 404 not found\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-Type: text/plain\r\n");
                begin_burst();
                wc_printf("There is no folder called \"%s\" on this server.\r\n",
@@ -131,7 +131,7 @@ void groupdav_put(void)
                        hprintf("HTTP/1.1 412 Precondition Failed\r\n");
                        syslog(9, "HTTP/1.1 412 Precondition Failed (ifmatch=%ld, old_msgnum=%ld)\r\n",
                                StrTol(WCC->Hdr->HR.dav_ifmatch), old_msgnum);
-                       groupdav_common_headers();
+                       dav_common_headers();
                        
                        end_burst();
                        FreeStrBuf(&dav_roomname);
@@ -143,7 +143,7 @@ void groupdav_put(void)
        /** PUT on the collection itself uploads an ICS of the entire collection.
         */
        if (StrLength(dav_uid) == 0) {
-               groupdav_put_bigics();
+               dav_put_bigics();
                FreeStrBuf(&dav_roomname);
                FreeStrBuf(&dav_uid);
                return;
@@ -158,7 +158,7 @@ void groupdav_put(void)
        serv_getln(buf, sizeof buf);
        if (buf[0] != '8') {
                hprintf("HTTP/1.1 502 Bad Gateway\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-type: text/plain\r\n");
                begin_burst();
                wc_printf("%s\r\n", &buf[4]);
@@ -195,7 +195,7 @@ void groupdav_put(void)
        /* Citadel failed in some way? */
        if (new_msgnum < 0L) {
                hprintf("HTTP/1.1 502 Bad Gateway\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("Content-type: text/plain\r\n");
                begin_burst();
                wc_printf("new_msgnum is %ld\r\n"
@@ -211,10 +211,10 @@ void groupdav_put(void)
                char escaped_uid[1024];
                hprintf("HTTP/1.1 201 Created\r\n");
                syslog(9, "HTTP/1.1 201 Created\r\n");
-               groupdav_common_headers();
+               dav_common_headers();
                hprintf("etag: \"%ld\"\r\n", new_msgnum);
                hprintf("Location: ");
-               groupdav_identify_hosthdr();
+               dav_identify_hosthdr();
                hprintf("/groupdav/");/* TODO */
                hurlescputs(ChrPtr(dav_roomname));
                euid_escapize(escaped_uid, ChrPtr(dav_uid));
@@ -228,7 +228,7 @@ void groupdav_put(void)
        /* We modified an existing item. */
        hprintf("HTTP/1.1 204 No Content\r\n");
        syslog(9, "HTTP/1.1 204 No Content\r\n");
-       groupdav_common_headers();
+       dav_common_headers();
        hprintf("Etag: \"%ld\"\r\n", new_msgnum);
        /* The item we replaced has probably already been deleted by
         * the Citadel server, but we'll do this anyway, just in case.
index f8261cf..f297bc0 100644 (file)
@@ -262,7 +262,7 @@ InitModule_ROOMVIEWS
        RegisterConditional(HKEY("COND:ROOM:TYPE_IS"), 0, ConditionalIsRoomtype, CTX_NONE);
 
        RegisterConditional(HKEY("COND:THISROOM:HAVE_VIEW"), 0, ConditionalThisRoomHaveView, CTX_NONE);
-       RegisterConditional(HKEY("COND:ROOM:GROUPDAV_CONTENT"), 0, ConditionalRoomHasGroupdavContent, CTX_ROOMS);
+       RegisterConditional(HKEY("COND:ROOM:dav_CONTENT"), 0, ConditionalRoomHasGroupdavContent, CTX_ROOMS);
 
        RegisterConditional(HKEY("COND:THISROOM:CURR_VIEW"), 0, ConditionalThisRoomCurrView, CTX_NONE);
        RegisterNamespace("ROOM:INFO:VIEW", 0, 1, tmplput_ROOM_VIEW, NULL, CTX_ROOMS);
index f9d2ab9..f1a01cf 100644 (file)
@@ -758,8 +758,10 @@ int GetNextParameter(StrBuf *Buf,
                else {
                        StrBufPeek(Buf, pch, -1, '\0');         
                        if (LoadTemplates > 1) {                        
-                               syslog(1, "DBG: got param [%s] %ld %ld\n", 
-                                       pchs, pche - pchs, strlen(pchs));
+                               syslog(1,
+                                       "DBG: got param [%s] %d %d\n", 
+                                       pchs, pche - pchs, strlen(pchs)
+                               );
                        }
                        Parm->Start = pchs;
                        Parm->len = pche - pchs;
index a3d313f..db30d48 100644 (file)
@@ -842,7 +842,7 @@ void session_loop(void)
                 */
                else {
                        if (xhttp)
-                               groupdav_main();
+                               dav_main();
                        else
                                display_main_menu();
                }