Fixed a bug in the previous commit.
The dump() function returns the size of the downloaded data, not a status code.
This commit is contained in:
parent
44e76cfa8e
commit
eee1c4cd74
@ -272,7 +272,7 @@ reefnet_sensuspro_device_foreach (device_t *abstract, dive_callback_t callback,
|
||||
unsigned char data[REEFNET_SENSUSPRO_MEMORY_SIZE] = {0};
|
||||
|
||||
int rc = reefnet_sensuspro_device_dump (abstract, data, sizeof (data));
|
||||
if (rc != DEVICE_STATUS_SUCCESS)
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
return reefnet_sensuspro_extract_dives (data, sizeof (data), callback, userdata);
|
||||
|
||||
@ -176,7 +176,7 @@ suunto_eon_device_foreach (device_t *abstract, dive_callback_t callback, void *u
|
||||
unsigned char data[SUUNTO_EON_MEMORY_SIZE] = {0};
|
||||
|
||||
int rc = suunto_eon_device_dump (abstract, data, sizeof (data));
|
||||
if (rc != DEVICE_STATUS_SUCCESS)
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
return suunto_eon_extract_dives (data, sizeof (data), callback, userdata);
|
||||
|
||||
@ -220,7 +220,7 @@ uwatec_aladin_device_foreach (device_t *abstract, dive_callback_t callback, void
|
||||
unsigned char data[UWATEC_ALADIN_MEMORY_SIZE] = {0};
|
||||
|
||||
int rc = uwatec_aladin_device_dump (abstract, data, sizeof (data));
|
||||
if (rc != DEVICE_STATUS_SUCCESS)
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
|
||||
return uwatec_aladin_extract_dives (data, sizeof (data), callback, userdata);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user