Resending Uemis patch for bugfix
Guido Lerch
guido.lerch at gmail.com
Mon Sep 14 13:41:38 PDT 2015
--
Best regards,
Guido
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150914/ed79e64b/attachment.html>
-------------- next part --------------
From 2ce18ea7ad0f09706376bc5ea461f7317487778e Mon Sep 17 00:00:00 2001
From: glerch <guido.lerch at gmail.com>
Date: Mon, 14 Sep 2015 22:40:08 +0200
Subject: [PATCH 6/6] Uemis bugfix - wrong variable addressing
Addresed a variable the wrong way
Signed-off-by: glerch <guido.lerch at gmail.com>
---
uemis-downloader.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 2f88c97..5ddee7a 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -1070,7 +1070,6 @@ static void get_uemis_divespot(const char *mountpath, int divespot_id, struct di
static bool get_matching_dive(int idx, int *dive_to_read, int *last_found_log_file_nr, int *deleted_files, char *newmax, int *uemis_mem_status, struct device_data_t *data, const char* mountpath, const char deviceidnr)
{
struct dive *dive = data->download_table->dives[idx];
- const char *dTime = get_dive_date_c_string(dive->when);
char log_file_no_to_find[20];
char dive_to_read_buf[10];
bool found = false;
@@ -1106,14 +1105,14 @@ static bool get_matching_dive(int idx, int *dive_to_read, int *last_found_log_fi
#endif
*last_found_log_file_nr = *dive_to_read;
int divespot_id = uemis_get_divespot_id_by_diveid(dive->dc.diveid);
- (void)get_uemis_divespot(mountpath, divespot_id, dive);
+ get_uemis_divespot(mountpath, divespot_id, dive);
} else {
/* in this case we found a deleted file, so let's increment */
#if UEMIS_DEBUG & 2
fprintf(debugfile, "TRY matching divelog id %d from %s with dive details %d but details are deleted\n", dive->dc.diveid, dTime, iDiveToRead);
#endif
- deleted_files++;
+ *deleted_files = *deleted_files + 1;
/* mark this log entry as deleted and cleanup later, otherwise we mess up our array */
dive->downloaded = false;
#if UEMIS_DEBUG & 2
@@ -1141,7 +1140,7 @@ static bool get_matching_dive(int idx, int *dive_to_read, int *last_found_log_fi
/* decrement iDiveToRead by the amount of deleted entries found to assure
* we are not missing any valid matches when processing subsequent logs */
*dive_to_read = (dive_to_read - deleted_files > 0 ? dive_to_read - deleted_files : 0);
- deleted_files = 0;
+ *deleted_files = 0;
if (*uemis_mem_status == UEMIS_MEM_FULL)
/* game over, not enough memory left */
return false;
--
1.9.5 (Apple Git-50.3)
More information about the subsurface
mailing list