Skip to content

Commit

Permalink
{configs/e2guardian.conf.in,src/OptionContainer.cpp}: Make sure value…
Browse files Browse the repository at this point in the history
…s of maxcontentfiltersize and maxcontentramcachesize obey to the requirements in the (inline) documentation.

 See Debian bug https://bugs.debian.org/998430 (which is a little hard to
 read, but the reported issue could be confirmed).
 .
 This change got lost on e2guardian's v5.5 branch, but is applied in
 similar form to the v5.4 branch. So, this basically is a regression fix.
  • Loading branch information
sunweaver committed Feb 9, 2024
1 parent 874c997 commit f1f3be5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions configs/e2guardian.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,7 @@ weightedphrasemode = 2
# The size is in Kibibytes - eg 2048 = 2Mb
# default 2048

#maxcontentramcachescansize = 2000
#maxcontentramcachescansize = 2048
#
# Max content ram cache scan size
# This is only used if you use a content scanner plugin such as AV
Expand All @@ -1113,7 +1113,7 @@ weightedphrasemode = 2
# The size is in Kibibytes - eg 10240 = 10Mb
# use 0 to set it to maxcontentfilecachescansize
# This option may be ignored by the configured download manager.
# default 2000
# default 2048

#maxcontentfilecachescansize = 20000
#
Expand Down
2 changes: 1 addition & 1 deletion src/OptionContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ bool OptionContainer::findContentScannerOptions(ConfigReader &cr)
content.max_content_filecache_scan_size = cr.findoptionIWithDefault("maxcontentfilecachescansize", 0, 0, 20000);
content.max_content_filecache_scan_size *= 1024;

content.max_content_ramcache_scan_size = cr.findoptionIWithDefault("maxcontentramcachescansize", 0, 0, 2000);
content.max_content_ramcache_scan_size = cr.findoptionIWithDefault("maxcontentramcachescansize", 0, 0, 2048);
content.max_content_ramcache_scan_size *= 1024;
if (content.max_content_ramcache_scan_size == 0) {
content.max_content_ramcache_scan_size = content.max_content_filecache_scan_size;
Expand Down

0 comments on commit f1f3be5

Please sign in to comment.