mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Make sure we don't create multiple dive sites with the same uuid
This shouldn't happen, but in case there is a logic error higher up in the code somewhere, this will prevent it from happening, period. If the code asks for a new dive site with a specific uuid, simply return the existing dive site with that uuid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7ad1485c39
commit
edac07554c
5 changed files with 28 additions and 14 deletions
|
|
@ -50,7 +50,7 @@ static inline struct dive_site *get_dive_site_by_uuid(uint32_t uuid)
|
|||
}
|
||||
|
||||
void dive_site_table_sort();
|
||||
struct dive_site *alloc_dive_site(uint32_t uuid);
|
||||
struct dive_site *alloc_or_get_dive_site(uint32_t uuid);
|
||||
int nr_of_dives_at_dive_site(uint32_t uuid, bool select_only);
|
||||
bool is_dive_site_used(uint32_t uuid, bool select_only);
|
||||
void delete_dive_site(uint32_t id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue