OBIDMS: Opened DMS now have a counter associated so that DMS are not

actually opened several times by the same program, which triggers the
cleaning of unfinished views and columns (to discuss)
This commit is contained in:
Celine Mercier
2017-11-24 17:58:47 +01:00
parent ee5d647d0d
commit 9e3ac477eb
4 changed files with 167 additions and 54 deletions

View File

@ -14,7 +14,7 @@ cdef extern from "obidms.h" nogil:
OBIDMS_p obi_test_open_dms(const_char_p dms_path)
OBIDMS_p obi_create_dms(const_char_p dms_path)
int obi_dms_exists(const char* dms_path)
int obi_close_dms(OBIDMS_p dms)
int obi_close_dms(OBIDMS_p dms, bint force)
char* obi_dms_get_dms_path(OBIDMS_p dms)
char* obi_dms_get_full_path(OBIDMS_p dms, const_char_p path_name)
void obi_close_atexit()

View File

@ -92,7 +92,7 @@ cdef class DMS(OBIWrapper):
cdef OBIDMS_p pointer = self.pointer()
if self.active() :
OBIWrapper.close(self)
if (obi_close_dms(pointer)) < 0 :
if (obi_close_dms(pointer, False)) < 0 :
raise Exception("Problem closing an OBIDMS")