aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-10-04 13:07:26 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-10-05 12:44:30 -0700
commit6f8837eca3c001d8389cfcbcfa6dfc511bd78b47 (patch)
treec3dd70e5af39465f4f40f957cf81118cb966f590
parent426a7f5442db06ddd8953e7ceec12156b91b12dd (diff)
downloadsubsurface-6f8837eca3c001d8389cfcbcfa6dfc511bd78b47.tar.gz
cleanup: remove libdc_serial field in device_data_t
This was only set but never read. Therefore, remove it. Divecomputer serial numbers are now handled via a string-based interface. We can't remove the integer-based firmware number, because that is still used by the OSTC firmware check in ConfigureDiveComputerDialog. Let's not risk breaking that. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--core/libdivecomputer.c3
-rw-r--r--core/libdivecomputer.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 78030e575..12b9dabf9 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -1117,10 +1117,9 @@ static void event_cb(dc_device_t *device, dc_event_type_t event, const void *dat
if (!strcmp(devdata->vendor, "Suunto"))
serial = fixup_suunto_versions(devdata, devinfo);
devdata->deviceid = calculate_sha1(devinfo->model, devinfo->firmware, serial);
- /* really, serial and firmware version are NOT numbers. We'll try to save them here
+ /* really, firmware version is NOT a number. We'll try to save it here
* in something that might work, but this really needs to be handled with the
* DC_FIELD_STRING interface instead */
- devdata->libdc_serial = devinfo->serial;
devdata->libdc_firmware = devinfo->firmware;
lookup_fingerprint(device, devdata);
diff --git a/core/libdivecomputer.h b/core/libdivecomputer.h
index f8a919bbe..50a151be0 100644
--- a/core/libdivecomputer.h
+++ b/core/libdivecomputer.h
@@ -36,7 +36,7 @@ typedef struct dc_user_device_t
const char *model, *btname;
unsigned char *fingerprint;
unsigned int fsize, fdiveid;
- uint32_t libdc_firmware, libdc_serial;
+ uint32_t libdc_firmware;
uint32_t deviceid, diveid;
dc_device_t *device;
dc_context_t *context;