Package: geoclue-hostip
Version: 0.11.1-5+b1
Severity: serious
Justification: renders package unusable

The hostip XML API has changed. freedesktop bug #24058[0] has been
opened with a patch to fix this. At the time of writing, upstream
appear very quiet in responding and pushing this fix, which is a
shame. It'd be nice to get this into Debian though.

I've attached the patch here for your convenience.

Thanks,

0. https://bugs.freedesktop.org/show_bug.cgi?id=24058

-- 
Jonny Lamb, UK
jo...@debian.org
From: Danielle Madeley <danielle.made...@collabora.co.uk>
Date: Mon, 21 Sep 2009 03:52:06 +0000 (+1000)
Subject: Fix HostIP provider to work with latest web API
X-Git-Url: 
http://git.collabora.co.uk/?p=user%2Fdanni%2Fgeoclue.git;a=commitdiff_plain;h=031705068aeb82f5dad378c36757d5679d125432

Fix HostIP provider to work with latest web API

The web API from api.hostip.info has removed the 'hostip' namespace. All of
the XPath queries required updating to remove the hostip namespace, otherwise
they don't match anything.
---

diff --git a/providers/hostip/geoclue-hostip.c 
b/providers/hostip/geoclue-hostip.c
index f9eda08..7419c83 100644
--- a/providers/hostip/geoclue-hostip.c
+++ b/providers/hostip/geoclue-hostip.c
@@ -42,13 +42,11 @@
 
 #define HOSTIP_NS_GML_NAME "gml"
 #define HOSTIP_NS_GML_URI "http://www.opengis.net/gml";
-#define HOSTIP_NS_HOSTIP_NAME "hostip"
-#define HOSTIP_NS_HOSTIP_URI "http://www.hostip.info/api";
 
-#define HOSTIP_COUNTRY_XPATH 
"//gml:featureMember/hostip:Hostip/hostip:countryName"
-#define HOSTIP_COUNTRYCODE_XPATH 
"//gml:featureMember/hostip:Hostip/hostip:countryAbbrev"
-#define HOSTIP_LOCALITY_XPATH "//gml:featureMember/hostip:Hostip/gml:name"
-#define HOSTIP_LATLON_XPATH 
"//gml:featureMember/hostip:Hostip//gml:coordinates"
+#define HOSTIP_COUNTRY_XPATH "//gml:featureMember/Hostip/countryName"
+#define HOSTIP_COUNTRYCODE_XPATH "//gml:featureMember/Hostip/countryAbbrev"
+#define HOSTIP_LOCALITY_XPATH "//gml:featureMember/Hostip/gml:name"
+#define HOSTIP_LATLON_XPATH "//gml:featureMember/Hostip//gml:coordinates"
 
 static void geoclue_hostip_init (GeoclueHostip *obj);
 static void geoclue_hostip_position_init (GcIfacePositionClass  *iface);
@@ -101,7 +99,6 @@ geoclue_hostip_get_position (GcIfacePosition        *iface,
                return FALSE;
        }
        
-       
        if (gc_web_service_get_string (obj->web_service, 
                                        &coord_str, HOSTIP_LATLON_XPATH)) {
                if (sscanf (coord_str, "%lf,%lf", longitude , latitude) == 2) {
@@ -240,8 +237,6 @@ geoclue_hostip_init (GeoclueHostip *obj)
        gc_web_service_set_base_url (obj->web_service, HOSTIP_URL);
        gc_web_service_add_namespace (obj->web_service,
                                      HOSTIP_NS_GML_NAME, HOSTIP_NS_GML_URI);
-       gc_web_service_add_namespace (obj->web_service,
-                                     HOSTIP_NS_HOSTIP_NAME, 
HOSTIP_NS_HOSTIP_URI);
 }
 
 static void

Reply via email to