aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-21 19:31:05 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-04-30 07:43:49 -0700
commit122111402d5988e8c8781ce1328fefa0f8bbf2df (patch)
treedbdd53f63c102b83eaccf4df56e66add786839a8
parentc2c574aad53b22690de6ab163c319afb8ca57b9f (diff)
downloadsubsurface-122111402d5988e8c8781ce1328fefa0f8bbf2df.tar.gz
Uemis downloader: get the right values set before bailing
This caused us to not read the auxiliary information for up to the last ten dives that were downloaded from the SDA. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--uemis-downloader.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 93d5e3997..ed3e94ec6 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -906,8 +906,14 @@ const char *do_uemis_import(device_data_t *data)
free(t);
once = false;
}
+ /* clean up mbuf */
+ endptr = strstr(mbuf, "{{{");
+ if (endptr)
+ *(endptr + 2) = '\0';
+ /* last object_id we parsed */
+ sscanf(newmax, "%d", &end);
#if UEMIS_DEBUG & 4
- fprintf(debugfile, "d_u_i after download and parse start %d end %d newmax %s\n", start, end, newmax);
+ fprintf(debugfile, "d_u_i after download and parse start %d end %d newmax %s progress %4.2f\n", start, end, newmax, progress_bar_fraction);
#endif
/* if the user clicked cancel, exit gracefully */
if (import_thread_cancelled)
@@ -920,12 +926,6 @@ const char *do_uemis_import(device_data_t *data)
result = translate("gettextFromC", ERR_FS_ALMOST_FULL);
break;
}
- /* clean up mbuf */
- endptr = strstr(mbuf, "{{{");
- if (endptr)
- *(endptr + 2) = '\0';
- /* last object_id we parsed */
- sscanf(newmax, "%d", &end);
}
if (end == -2 && sscanf(newmax, "%d", &end) != 1)
end = start;