35 lines
1.7 KiB
Diff
35 lines
1.7 KiB
Diff
From adae179bdfe89431a89360850dacd930402ab1eb Mon Sep 17 00:00:00 2001
|
|
From: Giovanni Bechis <gbechis@apache.org>
|
|
Date: Fri, 20 Nov 2020 07:33:00 +0000
|
|
Subject: [PATCH] fix GeoIP open_type call, bz #7871
|
|
|
|
git-svn-id: https://svn.apache.org/repos/asf/spamassassin/branches/3.4@1883660 13f79535-47bb-0310-9956-ffa450edef68
|
|
---
|
|
lib/Mail/SpamAssassin/Plugin/URILocalBL.pm | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm b/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm
|
|
index 4fbbcb78d6..4def393d87 100644
|
|
--- a/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm
|
|
+++ b/lib/Mail/SpamAssassin/Plugin/URILocalBL.pm
|
|
@@ -480,14 +480,14 @@ sub check_uri_local_bl {
|
|
my $flags = 0;
|
|
my $flag_isp = 0;
|
|
my $flag_silent = 0;
|
|
- eval '$flags = GEOIP_MEMORY_CACHE | GEOIP_CHECK_CACHE' if ($gip_wanted >= $gip_have);
|
|
- eval '$flag_silent = Geo::IP::GEOIP_SILENCE' if ($gip_wanted >= $gip_have);
|
|
- eval '$flag_isp = GEOIP_ISP_EDITION' if ($gip_wanted >= $gip_have);
|
|
+ eval '$flags = GEOIP_MEMORY_CACHE | GEOIP_CHECK_CACHE' if ($gip_have >= $gip_wanted);
|
|
+ eval '$flag_silent = GEOIP_SILENCE' if ($gip_have >= $gip_wanted);
|
|
+ eval '$flag_isp = GEOIP_ISP_EDITION' if ($gip_have >= $gip_wanted);
|
|
|
|
eval {
|
|
- if ($flag_silent && $gic_wanted >= $gic_have) {
|
|
+ if ($flag_silent && $gic_have >= $gic_wanted) {
|
|
$self->{geoip} = Geo::IP->new($flags | $flag_silent);
|
|
- $self->{geoisp} = Geo::IP->open_type($flag_isp | $flag_silent | $flags);
|
|
+ $self->{geoisp} = Geo::IP->open_type($flag_isp, $flag_silent | $flags);
|
|
} else {
|
|
open(OLDERR, ">&STDERR");
|
|
open(STDERR, ">", "/dev/null");
|