From eee1c4cd740f816de6b3ceabd287cac3b597e4f8 Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Tue, 29 Jul 2008 18:13:03 +0000 Subject: [PATCH] Fixed a bug in the previous commit. The dump() function returns the size of the downloaded data, not a status code. --- src/reefnet_sensuspro.c | 2 +- src/suunto_eon.c | 2 +- src/uwatec_aladin.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/reefnet_sensuspro.c b/src/reefnet_sensuspro.c index 2e15897..1af93e7 100644 --- a/src/reefnet_sensuspro.c +++ b/src/reefnet_sensuspro.c @@ -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); diff --git a/src/suunto_eon.c b/src/suunto_eon.c index da5de2d..0d2ce46 100644 --- a/src/suunto_eon.c +++ b/src/suunto_eon.c @@ -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); diff --git a/src/uwatec_aladin.c b/src/uwatec_aladin.c index 4187b42..7e74c01 100644 --- a/src/uwatec_aladin.c +++ b/src/uwatec_aladin.c @@ -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);