]> code.citadel.org Git - citadel.git/blobdiff - citadel/policy.c
* Changed the comments at the beginning of each file to a consistent format
[citadel.git] / citadel / policy.c
index d607d398f418702e17b6fb6c5f18d2734e15bf1b..b3223f14390712e9634f82024774ece5cbbcea3b 100644 (file)
@@ -1,9 +1,15 @@
+/* 
+ * $Id$
+ *
+ * Functions which manage policy for rooms (such as message expiry)
+ */
+
+#include "sysdep.h"
 #include <stdlib.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <sys/stat.h>
 #include <string.h>
-#include <pthread.h>
 #include <time.h>
 #include <limits.h>
 #include "citadel.h"
@@ -15,8 +21,8 @@
 #include "support.h"
 #include "user_ops.h"
 #include "msgbase.h"
-#include "serv_chat.h"
 #include "citserver.h"
+#include "tools.h"
 
 
 /*
@@ -79,7 +85,7 @@ void cmd_spex(char *argbuf) {
        struct floor flbuf;
        char which[256];
 
-       bzero(&exp, sizeof(struct ExpirePolicy));
+       memset(&exp, 0, sizeof(struct ExpirePolicy));
        extract(which, argbuf, 0);
        exp.expire_mode = extract_int(argbuf, 1);
        exp.expire_value = extract_int(argbuf, 2);
@@ -97,7 +103,7 @@ void cmd_spex(char *argbuf) {
                        }
                lgetroom(&CC->quickroom, CC->quickroom.QRname);
                memcpy(&CC->quickroom.QRep, &exp, sizeof(struct ExpirePolicy));
-               lputroom(&CC->quickroom, CC->quickroom.QRname);
+               lputroom(&CC->quickroom);
                cprintf("%d ok\n", OK);
                return;
                }