Merge pull request #237 from smtpd/revert-236-geoip-crash
Revert "Don't crash QP when GeoIP data is missing"
This commit is contained in:
commit
8cb7f8b226
@ -327,11 +327,8 @@ sub open_geoip_db {
|
|||||||
# can't think of a good reason to load country if city data is present
|
# can't think of a good reason to load country if city data is present
|
||||||
if (!$self->{_geoip_city}) {
|
if (!$self->{_geoip_city}) {
|
||||||
$self->log(LOGDEBUG, "using default db");
|
$self->log(LOGDEBUG, "using default db");
|
||||||
eval { $self->{_geoip} = Geo::IP->new(); }; # loads default Country DB
|
$self->{_geoip} = Geo::IP->new(); # loads default Country DB
|
||||||
if (!$self->{_geoip}) {
|
warn "Missing GeoIP Country data!\n" if ! $self->{_geoip};
|
||||||
my $err = $@ || 'Unknown error';
|
|
||||||
warn "Missing GeoIP Country data:$err\n";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user