summaryrefslogtreecommitdiff
path: root/network/dansguardian/dg.maxuploadsize.patch
blob: 80fad02296ab841e8ec91ea9aa6dd94d1d6cf4a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
diff -rub ../dist/dansguardian-2.12.0.3/src/FOptionContainer.cpp dansguardian-2.12.0.3/src/FOptionContainer.cpp
--- ../dist/dansguardian-2.12.0.3/src/FOptionContainer.cpp	Sat Sep 29 22:06:45 2012
+++ dansguardian-2.12.0.3/src/FOptionContainer.cpp	Wed Nov 28 20:05:20 2012
@@ -304,13 +304,6 @@
 		violationbody="";
 
 		threshold = findoptionI("threshold");
-                // TODO: Implement a "findoptionO" and a version of
-                // reality check which uses off_t, for large file support?
-                max_upload_size = findoptionI("maxuploadsize");
-                if (!realitycheck(max_upload_size, -1, 0, "maxuploadsize")) {
-                        return false;
-                }               // check its a reasonable value
-                max_upload_size *= 1024;
 
 		avadmin = findoptionS("avadmin");
 		if (avadmin.length()==0) {
diff -rub ../dist/dansguardian-2.12.0.3/src/OptionContainer.cpp dansguardian-2.12.0.3/src/OptionContainer.cpp
--- ../dist/dansguardian-2.12.0.3/src/OptionContainer.cpp	Sat Sep 29 22:06:45 2012
+++ dansguardian-2.12.0.3/src/OptionContainer.cpp	Wed Nov 28 20:09:32 2012
@@ -236,6 +236,15 @@
 		mailer = findoptionS("mailer");
 #endif
 	   
+                // TODO: Implement a "findoptionO" and a version of
+                // reality check which uses off_t, for large file support?
+                max_upload_size = findoptionI("maxuploadsize");
+                if (!realitycheck(max_upload_size, -1, 0, "maxuploadsize")) {
+                        return false;
+                }               // check its a reasonable value
+                if (max_upload_size > 0)
+			max_upload_size *= 1024;
+	   
 		// the dansguardian.conf and pics files get amalgamated into one
 		// deque.  They are only seperate files for clarity.