Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Patch to fix geoip_isp_maxmind.pm

Developers
jfroot
2007-10-05
2012-10-11
  • jfroot
    jfroot
    2007-10-05

    Here's a patch to fix the incorrect function calls within geoip_isp_maxmind.pm. If this patch is submitted wrong, sorry.. It's my first time submitting a patch to this project.

    I submitted a bug to this as BUGID: 1808277

    --
    Jeremy Freeman

    --- geoip_isp_maxmind.pm.orig 2007-10-05 12:02:52.000000000 -0700
    +++ geoip_isp_maxmind.pm 2007-10-05 12:01:33.000000000 -0700
    @@ -242,12 +242,13 @@
    if ($type eq 'geoippureperl')
    {
    # Function isp_by_addr does not exists in PurePerl but isp_by_name do same
    - $isp=$geoip_isp_maxmind->isp_by_name($param) if $geoip_isp_maxmind;
    + $isp=$geoip_isp_maxmind->org_by_name($param) if $geoip_isp_maxmind;
    +
    }
    else
    {
    - $isp=$geoip_isp_maxmind->isp_by_addr($param) if $geoip_isp_maxmind;
    - }
    + $isp=$geoip_isp_maxmind->org_by_addr($param) if $geoip_isp_maxmind;
    + }
    if ($Debug) { debug(" Plugin geoip_isp_maxmind: GetIspByIp for $param: [$isp]",5); }
    if ($isp) {
    if (length($isp) <= $MAXLENGTH) {
    @@ -266,11 +267,11 @@
    my $isp;
    if ($type eq 'geoippureperl')
    {
    - $isp=$geoip_isp_maxmind->isp_by_name($param) if $geoip_isp_maxmind;
    + $isp=$geoip_isp_maxmind->org_by_name($param) if $geoip_isp_maxmind;
    }
    else
    {
    - $isp=$geoip_isp_maxmind->isp_by_name($param) if $geoip_isp_maxmind;
    + $isp=$geoip_isp_maxmind->org_by_name($param) if $geoip_isp_maxmind;
    }
    if ($Debug) { debug(" Plugin geoip_isp_maxmind: GetIspByHostname for $param: [$isp]", 5); }
    if ($isp) {
    @@ -318,11 +319,11 @@
    if ($type eq 'geoippureperl')
    {
    # Function isp_by_addr does not exists in PurePerl but isp_by_name do same
    - $isp=$geoip_isp_maxmind->isp_by_name($param) if $geoip_isp_maxmind;
    + $isp=$geoip_isp_maxmind->org_by_name($param) if $geoip_isp_maxmind;
    }
    else
    {
    - $isp=$geoip_isp_maxmind->isp_by_addr($param) if $geoip_isp_maxmind;
    + $isp=$geoip_isp_maxmind->org_by_addr($param) if $geoip_isp_maxmind;
    }
    if ($Debug) { debug(" Plugin geoip_isp_maxmind: GetIspByIp for $param: [$isp]",5); }
    if ($isp) {
    @@ -347,11 +348,11 @@
    my $isp;
    if ($type eq 'geoippureperl')
    {
    - $isp=$geoip_isp_maxmind->isp_by_name($param) if $geoip_isp_maxmind;
    + $isp=$geoip_isp_maxmind->org_by_name($param) if $geoip_isp_maxmind;
    }
    else
    {
    - $isp=$geoip_isp_maxmind->isp_by_name($param) if $geoip_isp_maxmind;
    + $isp=$geoip_isp_maxmind->org_by_name($param) if $geoip_isp_maxmind;
    }
    if ($Debug) { debug(" Plugin geoip_isp_maxmind: GetIspByHostname for $param: [$isp]",5); }
    if ($isp) {
    @@ -375,7 +376,7 @@
    my $xmlold=shift;
    my $xmleb=shift;
    my $countlines=shift;
    - # <-----
    + # <-----\ if ($Debug) { debug(" Plugin geoip_isp_maxmind: Begin of PLUGIN_geoip_isp_maxmind section"); }
    my @field=();
    my $count=0;my $countloaded=0;