Don't ignore surface events in xml parsing

I missed the fact that not only did we skip importing surface events
from the dive computer, we had also made our xml parser ignore them when
loading an xml file.  All part of our historical "let's ignore surface
events because dive computers are being very annoying about it".

Signed-off-by: Linus Torvalds <torvalds@linux-foundtion.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Linus Torvalds 2016-05-31 11:38:47 -07:00 committed by Dirk Hohndel
parent 7bbd8cc974
commit 5ea16c0bab

View file

@ -1642,7 +1642,6 @@ static void event_start(void)
static void event_end(void)
{
struct divecomputer *dc = get_dc();
if (strcmp(cur_event.name, "surface") != 0) { /* 123 is a magic event that we used for a while to encode images in dives */
if (cur_event.type == 123) {
struct picture *pic = alloc_picture();
pic->filename = strdup(cur_event.name);
@ -1675,7 +1674,6 @@ static void event_end(void)
ev->gas.mix = cur_event.gas.mix;
}
}
}
cur_event.deleted = 1; /* No longer active */
}