]> code.citadel.org Git - citadel.git/blobdiff - citadel/imap_misc.c
* CtdlSaveMsg() is now CtdlSubmitMsg() and can accept any combination of
[citadel.git] / citadel / imap_misc.c
index 85432bbaa0450f64d49ec3fdbe1685a2e056d086..75e4b0d33138c072c9e9d298e366716e10ef53ee 100644 (file)
 #include <pwd.h>
 #include <errno.h>
 #include <sys/types.h>
-#include <sys/time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
 #include <sys/wait.h>
 #include <ctype.h>
 #include <string.h>
 #include <limits.h>
 #include "citadel.h"
 #include "server.h"
-#include <time.h>
 #include "sysdep_decls.h"
 #include "citserver.h"
 #include "support.h"
@@ -229,6 +239,7 @@ void imap_append(int num_parms, char *parms[]) {
 
         /* If the user is locally authenticated, FORCE the From: header to
          * show up as the real sender.  FIXME do we really want to do this?
+        * Probably should make it site-definable or even room-definable.
          */
         if (CC->logged_in) {
                 if (msg->cm_fields['A'] != NULL) phree(msg->cm_fields['A']);
@@ -268,7 +279,7 @@ void imap_append(int num_parms, char *parms[]) {
        else {
                /* Yes ... go ahead and post! */
                if (msg != NULL) {
-                       CtdlSaveMsg(msg, "", "", 0);
+                       CtdlSubmitMsg(msg, NULL, "");
                }
                cprintf("%s OK APPEND completed\r\n", parms[0]);
        }