summaryrefslogtreecommitdiffstats
path: root/core/libdivecomputer.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r--core/libdivecomputer.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 92e61b92c..cd1b69bde 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -1026,22 +1026,18 @@ const char *do_libdivecomputer_import(device_data_t *data)
err = translate("gettextFromC", "Unable to open %s %s (%s)");
#if defined(SSRF_CUSTOM_SERIAL)
- dc_serial_t *serial_device = NULL;
-
if (data->bluetooth_mode) {
#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_SERIAL)
- rc = dc_serial_qt_open(&serial_device, data->context, data->devname);
+ rc = dc_context_set_custom_serial(data->context, get_qt_serial_ops());
#endif
#ifdef SERIAL_FTDI
} else if (!strcmp(data->devname, "ftdi")) {
- rc = dc_serial_ftdi_open(&serial_device, data->context);
+ rc = dc_context_set_custom_serial(data->context, &serial_ftdi_ops);
#endif
}
if (rc != DC_STATUS_SUCCESS) {
report_error(errmsg(rc));
- } else if (serial_device) {
- rc = dc_device_custom_open(&data->device, data->context, data->descriptor, serial_device);
} else {
#else
{