Patch geoip.patch for geoip Bug #67231
Patch version 2014-05-08 03:46 UTC
Return to Bug #67231 |
Download this patch
Patch Revisions:
Developer: anthon@piwik.org
Index: geoip.c
===================================================================
--- geoip.c (revision 333498)
+++ geoip.c (working copy)
@@ -549,9 +549,9 @@
}
if (GeoIP_db_avail(GEOIP_CITY_EDITION_REV1) || GeoIP_db_avail(GEOIP_CITY_EDITION_REV0)) {
- if (GeoIP_db_avail(GEOIP_CITY_EDITION_REV1)) {
- gi = GeoIP_open_type(GEOIP_CITY_EDITION_REV1, GEOIP_STANDARD);
- } else {
+ gi = GeoIP_open_type(GEOIP_CITY_EDITION_REV1, GEOIP_STANDARD);
+
+ if (NULL == gi) {
gi = GeoIP_open_type(GEOIP_CITY_EDITION_REV0, GEOIP_STANDARD);
}
} else {
@@ -629,9 +629,9 @@
}
if (GeoIP_db_avail(GEOIP_REGION_EDITION_REV0) || GeoIP_db_avail(GEOIP_REGION_EDITION_REV1)) {
- if (GeoIP_db_avail(GEOIP_REGION_EDITION_REV1)) {
- gi = GeoIP_open_type(GEOIP_REGION_EDITION_REV1, GEOIP_STANDARD);
- } else {
+ gi = GeoIP_open_type(GEOIP_REGION_EDITION_REV1, GEOIP_STANDARD);
+
+ if (NULL == gi) {
gi = GeoIP_open_type(GEOIP_REGION_EDITION_REV0, GEOIP_STANDARD);
}
} else {
|