From 4e02f5f3a3af100d2f56e353a167b2b90c7252c0 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 19 Nov 2012 15:09:50 -0800 Subject: Correctly reset the ANS file number when restarting Uemis download If we ran out of space on the Uemis SDA during download and the user unmounted, unplugged and replugged the SDA, we need to take care to correctly reset the file number we use for finding the correct ANS file. Signed-off-by: Dirk Hohndel --- uemis-downloader.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'uemis-downloader.c') diff --git a/uemis-downloader.c b/uemis-downloader.c index 90f41620d..569f20353 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -128,11 +128,12 @@ static gboolean uemis_init(const char *path) if (sscanf(tmp + 1, "%d", &filenr) != 1) return FALSE; } -#if UEMIS_DEBUG > 1 else { + filenr = 0; +#if UEMIS_DEBUG > 1 fprintf(debugfile, "::r req.txt skipped as there were fewer than 5 bytes\n"); - } #endif + } close (reqtxt_file); /* It would be nice if we could simply go back to the first set of -- cgit v1.2.3-70-g09d2