]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Drop surface events when reading from an XML file too
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Sep 2011 03:51:03 +0000 (20:51 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Sep 2011 03:51:03 +0000 (20:51 -0700)
Remember those useless surface events that we ignore when we import a
dive from a dive computer? Yeah, they exist in the libdivelog xml files
too.  So ignore them when we see them there too.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
parse-xml.c

index e6472735dcdd40ca91bf69daebcb035ac7ed9be7..50f83f68bf8845977739e0d2db821f58d1c2bd1f 100644 (file)
@@ -1175,7 +1175,7 @@ static void event_start(void)
 
 static void event_end(void)
 {
-       if (event.name)
+       if (event.name && strcmp(event.name, "surface") != 0)
                add_event(dive, event.time.seconds, event.type, event.flags, event.value, event.name);
        event.active = 0;
 }