Am 17.09.2019 um 17:44 schrieb Pat Suwalski:
> On 2019-09-17 11:00 a.m., Patrick Matthäi wrote:
>> Could you test the patch below? It should restore the behaviour for
>> those IPs. then they are (again) listed as "serbia":
>
> That patch did not help. I looked into it further, and the error is
> triggered on the other "Unrecognized country code" circa line 1100.
>
> This very similar patch makes it work:
>
> --- geoip-csv-to-dat.cpp.orig    2019-09-17 07:31:42.000000000 -0400
> +++ geoip-csv-to-dat.cpp    2019-09-17 11:34:59.180224941 -0400
> @@ -1103,6 +1109,9 @@
>      if (csv_fields[CSV_FIELD_COUNTRY_CODE] == "AN") {
>          csv_fields[CSV_FIELD_COUNTRY_CODE] = "CW";
>      }
> +    else if (csv_fields[CSV_FIELD_COUNTRY_CODE] == "XK") {
> +        csv_fields[CSV_FIELD_COUNTRY_CODE] = "RS";
> +    }
>
>      const int countryid =
> GeoIP_id_by_code(csv_fields[CSV_FIELD_COUNTRY_CODE].c_str());
>      if (countryid == 0) {
>
>
> Note, the other patch circa line 873 is not needed. So, perhaps there
> is some nicer solution to fix this method, but the special case does
> work.

Thanks for testing, I have adopted your patch. I didnt had the time to
test it yesterday, but hmm for what I have got the code on the other
lines... ;-)


-- 
/*
Mit freundlichem Gruß / With kind regards,
 Patrick Matthäi
 GNU/Linux Debian Developer

  Blog: http://www.linux-dev.org/
E-Mail: pmatth...@debian.org
        patr...@linux-dev.org
*/

Reply via email to