Accidentally merged the configdb branch into master. Reverting.
[citadel.git] / citadel / journaling.c
index 4ebb118847803a18f2d70a8db319b4330d2d9e22..eb9e378e7f76872b95d7291d946598bcf2bb8ad2 100644 (file)
@@ -2,50 +2,17 @@
  * Message journaling functions.
  */
 
-#include "sysdep.h"
-#include <stdlib.h>
-#include <unistd.h>
 #include <stdio.h>
-#include <fcntl.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 <ctype.h>
-#include <string.h>
-#include <limits.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <sys/stat.h>
 #include <libcitadel.h>
-#include "citadel.h"
-#include "server.h"
-#include "database.h"
-#include "msgbase.h"
-#include "support.h"
-#include "sysdep_decls.h"
+
+#include "ctdl_module.h"
+
 #include "citserver.h"
-#include "room_ops.h"
 #include "user_ops.h"
-#include "config.h"
-#include "control.h"
-#include "genstamp.h"
-#include "internet_addressing.h"
 #include "serv_vcard.h"                        /* Needed for vcard_getuser and extract_inet_email_addrs */
+#include "internet_addressing.h"
 #include "journaling.h"
 
-#include "ctdl_module.h"
-#include "threads.h"
-
 struct jnlq *jnlq = NULL;      /* journal queue */
 
 /*
@@ -53,7 +20,7 @@ struct jnlq *jnlq = NULL;     /* journal queue */
  */
 void JournalBackgroundSubmit(struct CtdlMessage *msg,
                        StrBuf *saved_rfc822_version,
-                       struct recptypes *recps) {
+                       recptypes *recps) {
 
        struct jnlq *jptr = NULL;
 
@@ -69,7 +36,7 @@ void JournalBackgroundSubmit(struct CtdlMessage *msg,
                return;
        }
        memset(jptr, 0, sizeof(struct jnlq));
-       if (recps != NULL) memcpy(&jptr->recps, recps, sizeof(struct recptypes));
+       if (recps != NULL) memcpy(&jptr->recps, recps, sizeof(recptypes));
        if (!CM_IsEmpty(msg, eAuthor)) jptr->from = strdup(msg->cm_fields[eAuthor]);
        if (!CM_IsEmpty(msg, eNodeName)) jptr->node = strdup(msg->cm_fields[eNodeName]);
        if (!CM_IsEmpty(msg, erFc822Addr)) jptr->rfca = strdup(msg->cm_fields[erFc822Addr]);
@@ -121,7 +88,7 @@ void local_to_inetemail(char *inetemail, char *localuser, size_t inetemail_len)
 void JournalRunQueueMsg(struct jnlq *jmsg) {
 
        struct CtdlMessage *journal_msg = NULL;
-       struct recptypes *journal_recps = NULL;
+       recptypes *journal_recps = NULL;
        StrBuf *message_text = NULL;
        char mime_boundary[256];
        long mblen;
@@ -161,7 +128,7 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
                                         "--Citadel-Journal-%08lx-%04x--", time(NULL), ++seq);
                        rfc822len = strlen(jmsg->rfc822);
                       
-                       message_text = NewStrBufPlain(NULL, rfc822len + sizeof(struct recptypes) + 1024);
+                       message_text = NewStrBufPlain(NULL, rfc822len + sizeof(recptypes) + 1024);
 
                        /*
                         * Here is where we begin to compose the journalized message.