Created
April 11, 2012 21:03
-
-
Save findchris/2362565 to your computer and use it in GitHub Desktop.
Patch to add region name to geoiplookup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \diff --git a/apps/geoiplookup.c b/apps/geoiplookup.c | |
| index bd3c6fc..44a6d8e 100644 | |
| --- a/apps/geoiplookup.c | |
| +++ b/apps/geoiplookup.c | |
| @@ -296,7 +296,8 @@ geoiplookup(GeoIP * gi, char *hostname, int i) | |
| printf("%s: IP Address not found\n", GeoIPDBDescription[i]); | |
| } | |
| else { | |
| - printf("%s: %s, %s, %s, %s, %f, %f\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region), | |
| + printf("%s: %s, %s, %s, %s, %s, %f, %f\n", GeoIPDBDescription[i], gir->country_code, _mk_NA(gir->region), | |
| + _mk_NA(GeoIP_region_name_by_code(gir->country_code, gir->region)), | |
| _mk_NA(gir->city), _mk_NA(gir->postal_code), gir->latitude, gir->longitude); | |
| _say_range_by_ip(gi, ipnum); | |
| GeoIPRecord_delete(gir); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment