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>
This commit is contained in:
Berthold Stoeger 2020-10-04 13:07:26 +02:00 committed by Dirk Hohndel
parent 426a7f5442
commit 6f8837eca3
2 changed files with 2 additions and 3 deletions

View file

@ -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);

View file

@ -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;