diff options
-rw-r--r-- | parse-xml.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/parse-xml.c b/parse-xml.c index 16988cd38..2e7882ece 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -2665,13 +2665,20 @@ extern int cobalt_dive(void *param, int columns, char **data, char **column) */ settings_start(); dc_settings_start(); - if (data[9]) + if (data[9]) { utf8_string(data[9], &cur_settings.dc.serial_nr); + cur_settings.dc.deviceid = atoi(data[9]); + cur_settings.dc.model = strdup("Cobalt import"); + } - cur_settings.dc.deviceid = 0xffffffff; dc_settings_end(); settings_end(); + if (data[9]) { + cur_dive->dc.deviceid = atoi(data[9]); + cur_dive->dc.model = strdup("Cobalt import"); + } + snprintf(get_buffer, sizeof(get_buffer) - 1, get_cylinder_template, cur_dive->number); retval = sqlite3_exec(handle, get_buffer, &cobalt_cylinders, 0, &err); if (retval != SQLITE_OK) { |