[PATCH] Associate existing dive site to current dive
Dirk Hohndel
dirk at hohndel.org
Sat Feb 14 10:46:05 PST 2015
oops, this messages got stuck in my outbox...
/D
On Sat, Feb 14, 2015 at 11:33:56AM +0200, Miika Turkia wrote:
> If the dive site exists, we need to associate the uuid to current dive.
>
> Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
> ---
> parse-xml.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/parse-xml.c b/parse-xml.c
> index cfe3459..97d0c09 100644
> --- a/parse-xml.c
> +++ b/parse-xml.c
> @@ -1226,6 +1226,10 @@ static void add_dive_site(char *buffer, struct dive *dive)
> } else if (!same_string(ds->name, buffer)) {
> // coin toss, let's just keep the first name we found
> fprintf(stderr, "which means the dive already links to dive site of different name {%s} / {%s}\n", ds->name, buffer);
> + } else {
> + // add the existing dive site to the current dive
> + fprintf(stderr, "we have an existing location, using {%s}\n", ds->name);
> + dive->dive_site_uuid = uuid;
Read the beginning of the function... if I'm not mistaken, ds is created
from dive->dive_site_uuid... so there should be no reason to set it again.
Am I missing something?
/D
More information about the subsurface
mailing list