diff options
Diffstat (limited to 'core/parse.c')
-rw-r--r-- | core/parse.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/core/parse.c b/core/parse.c index 005a971e5..7135babb8 100644 --- a/core/parse.c +++ b/core/parse.c @@ -411,7 +411,6 @@ void utf8_string(char *buffer, void *_res) void add_dive_site(char *ds_name, struct dive *dive) { - static int suffix = 1; char *buffer = ds_name; char *to_free = NULL; int size = trimspace(buffer); @@ -426,18 +425,6 @@ void add_dive_site(char *ds_name, struct dive *dive) if (!uuid) { // if the dive doesn't have a uuid, check if there's already a dive site by this name uuid = get_dive_site_uuid_by_name(buffer, &ds); - if (uuid && import_source == SSRF_WS) { - // when downloading GPS fixes from the Subsurface webservice we will often - // get a lot of dives with identical names (the autogenerated fixes). - // So in this case modify the name to make it unique - int name_size = strlen(buffer) + 10; // 8 digits - enough for 100 million sites - to_free = buffer = malloc(name_size); - do { - suffix++; - snprintf(buffer, name_size, "%s %8d", ds_name, suffix); - } while (get_dive_site_uuid_by_name(buffer, NULL) != 0); - ds = NULL; - } } if (ds) { // we have a uuid, let's hope there isn't a different name |