]> 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 dbd224ff705a73d125616ed6621660ee19fe1ed8..fba0c767ebacc1cf7ad27d59d1b570a04709ac8d 100644 (file)
@@ -1,6 +1,4 @@
 /*
- * $Id$
- *
  * Copyright (c) 1987-2010 by the citadel.org team
  *
  * This program is free software; you can redistribute it and/or modify
@@ -52,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"
@@ -287,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;
@@ -351,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");
@@ -397,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 {