* move some more vars from the session context to strbuf (the use of StrBufAppendTemp...
[citadel.git] / webcit / groupdav_delete.c
index 2a76687b1e811fde160cf17ef9309a9d81a570f0..20915900f5b4eb742bd7d904e10c0c81a0747f7e 100644 (file)
@@ -14,7 +14,6 @@
  * The pathname is always going to be /groupdav/room_name/euid
  */
 void groupdav_delete(StrBuf *dav_pathname, char *dav_ifmatch) {
-       char dav_roomname[SIZ];
        char dav_uid[SIZ];
        long dav_msgnum = (-1);
        char buf[SIZ];
@@ -35,13 +34,12 @@ void groupdav_delete(StrBuf *dav_pathname, char *dav_ifmatch) {
        if ((len > 0) && (ChrPtr(dav_pathname)[len-1] == '/')) {
                StrBufCutRight(dav_pathname, 1);
        }
-       strcpy(dav_roomname, ChrPtr(dav_pathname));
 
        /* Go to the correct room. */
-       if (strcasecmp(WC->wc_roomname, dav_roomname)) {
-               gotoroom(dav_roomname);
+       if (strcasecmp(ChrPtr(WC->wc_roomname), ChrPtr(dav_pathname))) {
+               gotoroom(dav_pathname);
        }
-       if (strcasecmp(WC->wc_roomname, dav_roomname)) {
+       if (strcasecmp(ChrPtr(WC->wc_roomname), ChrPtr(dav_pathname))) {
                hprintf("HTTP/1.1 404 not found\r\n");
                groupdav_common_headers();
                hprintf("Content-Length: 0\r\n\r\n");