summaryrefslogtreecommitdiffstats
path: root/parse-xml.c
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-05-10 12:44:35 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-10 11:14:20 -0700
commit627de38c01f6bcba56221ed3703bd08d1d215168 (patch)
tree1bdd70a21eb5b707dcd11a7b0bf9a18db5ff5ca4 /parse-xml.c
parent412844c02b5180e67337de2404629163d0434574 (diff)
downloadsubsurface-627de38c01f6bcba56221ed3703bd08d1d215168.tar.gz
Get the location information in a separate thread
This makes Subsurface usable faster for those without a good internet connection when they are opening an older data file. While parsing, we are only feeding an vector of locations, after the parsing is done, we traverse the vector searching for the information on the web. I need to also add a way to stop if there`s no internet connection - but this will be another patch. Also, fixed two small memory leaks from the old imp. [Dirk Hohndel: cleaned up the whitespace mess] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'parse-xml.c')
-rw-r--r--parse-xml.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 819d3a8ca..9f748cd9d 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1167,7 +1167,7 @@ static void gps_location(char *buffer, struct dive_site *ds)
/* this is in qthelper.cpp, so including the .h file is a pain */
extern const char *printGPSCoords(int lat, int lon);
-extern void reverseGeoLookup(degrees_t, degrees_t, uint32_t);
+extern void add_geo_information_for_loockup(degrees_t latitude, degrees_t longitude, uint32_t uuid);
static void gps_in_dive(char *buffer, struct dive *dive)
{
@@ -1206,7 +1206,7 @@ static void gps_in_dive(char *buffer, struct dive *dive)
}
}
if (ds && (!ds->notes || strstr(ds->notes, "countrytag:") == NULL))
- reverseGeoLookup(latitude, longitude, dive->dive_site_uuid);
+ add_geo_information_for_loockup(latitude, longitude, dive->dive_site_uuid);
}
static void add_dive_site(char *buffer, struct dive *dive)