SF.net SVN: gar:[22896] csw/mgar/pkg/mirrorbrain/trunk

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Sun Jan 26 21:29:42 CET 2014


Revision: 22896
          http://sourceforge.net/p/gar/code/22896
Author:   dmichelsen
Date:     2014-01-26 20:29:38 +0000 (Sun, 26 Jan 2014)
Log Message:
-----------
mirrorbrain/trunk: Add patch when geoip file location was wrong

Modified Paths:
--------------
    csw/mgar/pkg/mirrorbrain/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/mirrorbrain/trunk/files/0001-Exit-if-geoip-file-cannot-be-opened.patch

Modified: csw/mgar/pkg/mirrorbrain/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mirrorbrain/trunk/Makefile	2014-01-26 14:27:20 UTC (rev 22895)
+++ csw/mgar/pkg/mirrorbrain/trunk/Makefile	2014-01-26 20:29:38 UTC (rev 22896)
@@ -18,6 +18,9 @@
 #   http://mirrorbrain.org/issues/issue135
 PATCHFILES += 0001-Change-default-for-getaddrinfo.patch
 
+# Use patch until this is fixed:
+PATCHFILES += 0001-Exit-if-geoip-file-cannot-be-opened.patch
+
 VENDOR_URL = http://mirrorbrain.org
 
 # Apache paths

Added: csw/mgar/pkg/mirrorbrain/trunk/files/0001-Exit-if-geoip-file-cannot-be-opened.patch
===================================================================
--- csw/mgar/pkg/mirrorbrain/trunk/files/0001-Exit-if-geoip-file-cannot-be-opened.patch	                        (rev 0)
+++ csw/mgar/pkg/mirrorbrain/trunk/files/0001-Exit-if-geoip-file-cannot-be-opened.patch	2014-01-26 20:29:38 UTC (rev 22896)
@@ -0,0 +1,43 @@
+From b9bad73a01288801847ba7f01c1980453885cab7 Mon Sep 17 00:00:00 2001
+From: Dagobert Michelsen <dam at opencsw.org>
+Date: Sun, 26 Jan 2014 21:28:31 +0100
+Subject: [PATCH] Exit if geoip file cannot be opened
+
+---
+ tools/geoiplookup_city.c      | 4 ++++
+ tools/geoiplookup_continent.c | 4 ++++
+ 2 files changed, 8 insertions(+)
+
+diff --git a/tools/geoiplookup_city.c b/tools/geoiplookup_city.c
+index 2b33c1d..6faed7e 100644
+--- a/tools/geoiplookup_city.c
++++ b/tools/geoiplookup_city.c
+@@ -58,6 +58,10 @@ int main(int argc, char **argv) {
+         }
+ 
+ 	gip = GeoIP_open(geoipfilename, GEOIP_STANDARD);
++	if( gip == NULL ) {
++		printf("An error occured during GeoIP_open\n");
++		return 1;
++	}
+ 	edition = GeoIP_database_edition(gip);
+ 
+ 	if (edition == GEOIP_COUNTRY_EDITION) {
+diff --git a/tools/geoiplookup_continent.c b/tools/geoiplookup_continent.c
+index 983afe2..871b247 100644
+--- a/tools/geoiplookup_continent.c
++++ b/tools/geoiplookup_continent.c
+@@ -56,6 +56,10 @@ int main(int argc, char **argv) {
+         }
+ 
+ 	gip = GeoIP_open(geoipfilename, GEOIP_STANDARD);
++	if( gip == NULL ) {
++		printf("An error occured during GeoIP_open\n");
++		return 1;
++	}
+ 	edition = GeoIP_database_edition(gip);
+ 
+ 	if (edition == GEOIP_COUNTRY_EDITION) {
+-- 
+1.8.4.1
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list