We obviously should lookup if the dive site already exist before
creating a new one.

Signed-off-by: Miika Turkia <[email protected]>
---
 parse-xml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/parse-xml.c b/parse-xml.c
index 429277f..17a2df3 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -3100,7 +3100,7 @@ extern int divinglog_dive(void *param, int columns, char 
**data, char **column)
        cur_dive->when = (time_t)(atol(data[1]));
 
        if (data[2])
-               cur_dive->dive_site_uuid = create_dive_site(data[2]);
+               cur_dive->dive_site_uuid = 
find_or_create_dive_site_with_name(data[2]);
 
        if (data[3])
                utf8_string(data[3], &cur_dive->buddy);
-- 
2.1.4

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to