Slight change to the parser to avoid false posititives

The webservice output uses 'name' as the tag for the dive location. This
was added to the parser as unqualified tag and without this change
test24.xml was suddenly recognized as a dive (the parser was triggering on
the program 'name' attribute). Name should only be recognized as a dive
location if it is indeed a child of dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-01-24 14:43:00 -08:00
parent 51880785af
commit 67d8891af5

View file

@ -1008,7 +1008,7 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
return;
if (MATCH(".location", utf8_string, &dive->location))
return;
if (MATCH(".name", utf8_string, &dive->location))
if (MATCH("dive.name", utf8_string, &dive->location))
return;
if (MATCH(".suit", utf8_string, &dive->suit))
return;