mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: remove device-fingerprint C access code
No need to have this code, as all callers are now C++. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
73f2605ab1
commit
2fd226964c
9 changed files with 69 additions and 128 deletions
|
@ -1010,13 +1010,11 @@ static void verify_fingerprint(dc_device_t *device, device_data_t *devdata, cons
|
|||
*/
|
||||
static void lookup_fingerprint(dc_device_t *device, device_data_t *devdata)
|
||||
{
|
||||
const unsigned char *raw_data;
|
||||
|
||||
if (devdata->force_download)
|
||||
return;
|
||||
|
||||
/* first try our in memory data - raw_data is owned by the table, the dc_device_set_fingerprint function copies the data */
|
||||
int fsize = get_fingerprint_data(&fingerprint_table, calculate_string_hash(devdata->model.c_str()), devdata->devinfo.serial, &raw_data);
|
||||
auto [fsize, raw_data] = get_fingerprint_data(fingerprints, calculate_string_hash(devdata->model.c_str()), devdata->devinfo.serial);
|
||||
if (fsize) {
|
||||
if (verbose)
|
||||
dev_info(devdata, "... found fingerprint in dive table");
|
||||
|
@ -1538,7 +1536,7 @@ std::string do_libdivecomputer_import(device_data_t *data)
|
|||
*/
|
||||
save_fingerprint(data);
|
||||
if (data->fingerprint && data->fdiveid)
|
||||
create_fingerprint_node(&fingerprint_table, calculate_string_hash(data->model.c_str()), data->devinfo.serial,
|
||||
create_fingerprint_node(fingerprints, calculate_string_hash(data->model.c_str()), data->devinfo.serial,
|
||||
data->fingerprint, data->fsize, data->fdeviceid, data->fdiveid);
|
||||
free(data->fingerprint);
|
||||
data->fingerprint = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue