more places where we can use cm_lengths;
[citadel.git] / citadel / modules / ctdlproto / serv_messages.c
index 9f08d880f626f05cd164bc1348d022300a8e4038..e2fda42ce4ad26ddb026c094d73ad21a3b61bef7 100644 (file)
  * GNU General Public License for more details.
  */
 
-#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 <sys/types.h>
-#include <regex.h>
-
-#include "md5.h"
-
 #include <libcitadel.h>
-#include "citadel.h"
-#include "server.h"
-#include "serv_extensions.h"
-#include "database.h"
-///#include "msgbase.h"
-#include "support.h"
-#include "sysdep_decls.h"
-#include "citserver.h"
-#include "room_ops.h"
-#include "user_ops.h"
-#include "files.h"
-#include "config.h"
-#include "control.h"
-#include "genstamp.h"
-#include "internet_addressing.h"
-#include "euidindex.h"
-#include "journaling.h"
-#include "citadel_dirs.h"
-#include "clientsocket.h"
-#include "threads.h"
 
+#include "citserver.h"
 #include "ctdl_module.h"
+#include "internet_addressing.h"
+#include "user_ops.h"
+#include "room_ops.h"
 
 extern char *msgkeys[];
 
@@ -376,10 +332,10 @@ void cmd_ent0(char *entargs)
        int anonymous = 0;
        char errmsg[SIZ];
        int err = 0;
-       struct recptypes *valid = NULL;
-       struct recptypes *valid_to = NULL;
-       struct recptypes *valid_cc = NULL;
-       struct recptypes *valid_bcc = NULL;
+       recptypes *valid = NULL;
+       recptypes *valid_to = NULL;
+       recptypes *valid_cc = NULL;
+       recptypes *valid_bcc = NULL;
        char subject[SIZ];
        int subject_required = 0;
        int do_confirm = 0;
@@ -648,7 +604,7 @@ void cmd_ent0(char *entargs)
                 * to the actual mail address so others get a valid
                 * reply-to-header.
                 */
-               msg->cm_fields[eenVelopeTo] = strdup(valid->recp_orgroom);
+               CM_SetField(msg, eenVelopeTo, valid->recp_orgroom, strlen(valid->recp_orgroom));
        }
 
        if (msg != NULL) {