summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-21 15:34:04 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-21 15:34:04 -0800
commit10ce60e2120419282ff7694e8deda60e94832aa1 (patch)
tree6ea6a96da0b4209879e20b429672ae73b79a8ebb /dive.h
parentd872a5c8aab858fa7a06b6f91f2dda57a43a6306 (diff)
downloadsubsurface-10ce60e2120419282ff7694e8deda60e94832aa1.tar.gz
Fix "prefer download" behavior
When this was first implemented the assumption was that a downloaded dive that is to be merged with an existing dive would have the same time stamp. But as Linus pointed out even back then, this does fail if a dive has been merged with a download from a different dive computer before (think: download from computer a, then download same dive from b, then improve something in the parsing from computer a and try to redownload; the time stamp could have changed). This commit also fixes a silly omission in the merge_dives() function (which ended up ALWAYS prefering the downloaded dive) and finally implements the necessary changes to mark dives downloaded from a Uemis SDA as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/dive.h b/dive.h
index 7131b3eaf..d4e2d3eaf 100644
--- a/dive.h
+++ b/dive.h
@@ -392,7 +392,7 @@ static inline struct dive *get_dive(int nr)
for ((_i) = 0; ((_x) = get_dive(_i)) != NULL; (_i)++)
extern void parse_xml_init(void);
-extern void parse_xml_buffer(const char *url, const char *buf, int size, GError **error);
+extern void parse_xml_buffer(const char *url, const char *buf, int size, gboolean downloaded, GError **error);
extern void parse_xml_exit(void);
extern void set_filename(const char *filename, gboolean force);