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:
Jef Driesen 2008-07-29 18:13:03 +00:00
parent 44e76cfa8e
commit eee1c4cd74
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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