]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/imap/imap_misc.c
imap server update to new API
[citadel.git] / citadel / modules / imap / imap_misc.c
index 496174a42b7ad9d083a17aac8a1368c26c260f01..fba0c767ebacc1cf7ad27d59d1b570a04709ac8d 100644 (file)
@@ -1,23 +1,19 @@
 /*
- * $Id$
+ * Copyright (c) 1987-2010 by the citadel.org team
  *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
  *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- * Copyright (c) 2001-2009 by the citadel.org team
- *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 
@@ -54,7 +50,6 @@
 #include "support.h"
 #include "config.h"
 #include "user_ops.h"
-#include "policy.h"
 #include "database.h"
 #include "msgbase.h"
 #include "internet_addressing.h"
@@ -100,7 +95,7 @@ int imap_do_copy(const char *destination_folder) {
        }
 
        if (num_selected > 0) {
-               CtdlSaveMsgPointersInRoom(roomname, selected_msgs, num_selected, 1, NULL);
+               CtdlSaveMsgPointersInRoom(roomname, selected_msgs, num_selected, 1, NULL, 0);
        }
        free(selected_msgs);
 
@@ -289,7 +284,8 @@ void imap_append(int num_parms, ConstStr *Params) {
        long new_msgnum = (-1L);
        int ret = 0;
        char roomname[ROOMNAMELEN];
-       char buf[SIZ];
+       char errbuf[SIZ];
+       char dummy[SIZ];
        char savedroom[ROOMNAMELEN];
        int msgs, new;
        int i;
@@ -353,7 +349,7 @@ void imap_append(int num_parms, ConstStr *Params) {
         * text) is received.  This call to client_getln() absorbs it.
         */
        flush_output();
-       client_getln(buf, sizeof buf);
+       client_getln(dummy, sizeof dummy);
 
        /* Convert RFC822 newlines (CRLF) to Unix newlines (LF) */
        CtdlLogPrintf(CTDL_DEBUG, "Converting CRLF to LF\n");
@@ -399,11 +395,11 @@ void imap_append(int num_parms, ConstStr *Params) {
        /* 
         * Can we post here?
         */
-       ret = CtdlDoIHavePermissionToPostInThisRoom(buf, sizeof buf, NULL, POST_LOGGED_IN);
+       ret = CtdlDoIHavePermissionToPostInThisRoom(errbuf, sizeof errbuf, NULL, POST_LOGGED_IN, 0);
 
        if (ret) {
                /* Nope ... print an error message */
-               cprintf("%s NO %s\r\n", Params[0].Key, buf);
+               cprintf("%s NO %s\r\n", Params[0].Key, errbuf);
        }
 
        else {