]> code.citadel.org Git - citadel.git/blobdiff - citadel/config.c
* config.c: default setting for "maxmsglen" is now 10 megabytes, not INT_MAX
[citadel.git] / citadel / config.c
index 117f2bf2c8414d2ffd37a4c2d3e18ebeb2a0a331..ed95eab0a5b3b81648a89674bdc10281f6c833ce 100644 (file)
@@ -20,7 +20,7 @@
 #include <limits.h>
 #include "citadel.h"
 #include "server.h"
-#include "dynloader.h"
+#include "serv_extensions.h"
 #include "config.h"
 
 struct config config;
@@ -80,11 +80,12 @@ void get_config(void) {
                exit(1);
        }
 
-        /* Default maximum message length is 'unlimited' (max int)
-         * and the minimum is 8192
+        /* Default maximum message length is 10 megabytes.  This is site
+        * configurable.  Also check to make sure the limit has not been
+        * set below 8192 bytes.
          */
         if (config.c_maxmsglen <= 0)
-                config.c_maxmsglen = INT_MAX;
+                config.c_maxmsglen = 10485760;
         if (config.c_maxmsglen < 8192)
                 config.c_maxmsglen = 8192;