[PATCH] Fix dive water temperature XML parsing

Linus Torvalds torvalds at linux-foundation.org
Tue Jun 3 16:01:48 PDT 2014


We parsed it rigth for dive computers, but not for the manually filled 
per-dive case. The git save seems to have gotten it right.

I think this has been broken since the whole "move as much as possible to 
the dive computer sections", but I didn't actually check.

Reported-by: roberto forini <forini.r at gmail.com>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 parse-xml.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/parse-xml.c b/parse-xml.c
index f6806d28a279..cef5221dbaf1 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -1154,6 +1154,8 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
 		return;
 	if (MATCH("air.divetemperature", temperature, &dive->airtemp))
 		return;
+	if (MATCH("water.divetemperature", temperature, &dive->watertemp))
+		return;
 
 	nonmatch("dive", name, buf);
 }


More information about the subsurface mailing list