diff --git a/core/parse-xml.c b/core/parse-xml.c index 5eccbb9a7..e22881b0f 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -2721,14 +2721,27 @@ extern int shearwater_dive(void *param, int columns, char **data, char **column) dc_settings_start(); if (data[9]) utf8_string(data[9], &cur_settings.dc.serial_nr); - if (data[10]) - utf8_string(data[10], &cur_settings.dc.model); + if (data[10]) { + switch (atoi(data[10])) { + default: + cur_settings.dc.model = strdup("Shearwater import"); + break; + } + } cur_settings.dc.deviceid = atoi(data[9]); dc_settings_end(); settings_end(); + if (data[10]) { + switch (atoi(data[10])) { + default: + cur_dive->dc.model = strdup("Shearwater import"); + break; + } + } + snprintf(get_buffer, sizeof(get_buffer) - 1, get_cylinder_template, cur_dive->number); retval = sqlite3_exec(handle, get_buffer, &shearwater_cylinders, 0, &err); if (retval != SQLITE_OK) {