diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-06-30 19:01:51 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2008-06-30 19:01:51 +0000 |
commit | 08574c43d314cf9ac189e2d2c6467bca6ed9e97e (patch) | |
tree | 8e5e8d9e9ff725a97e18ceae94920bb3d7c401ce /rbutil/sansapatcher/sansapatcher.c | |
parent | 97a143279b78799d722e3f992e1a59e32ef3c489 (diff) | |
download | rockbox-08574c43d314cf9ac189e2d2c6467bca6ed9e97e.tar.gz rockbox-08574c43d314cf9ac189e2d2c6467bca6ed9e97e.zip |
When scanning for Ipod / Sansa close the disc handle of every tried disc, not only for successful checks. Fixes "no Sansa found" issues with rbutil on w32 after autodetection was used.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17893 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/sansapatcher/sansapatcher.c')
-rw-r--r-- | rbutil/sansapatcher/sansapatcher.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rbutil/sansapatcher/sansapatcher.c b/rbutil/sansapatcher/sansapatcher.c index 30433e282e..82a87bf46e 100644 --- a/rbutil/sansapatcher/sansapatcher.c +++ b/rbutil/sansapatcher/sansapatcher.c | |||
@@ -514,15 +514,18 @@ int sansa_scan(struct sansa_t* sansa) | |||
514 | if(result == -2) { | 514 | if(result == -2) { |
515 | denied++; | 515 | denied++; |
516 | } | 516 | } |
517 | sansa_close(sansa); | ||
517 | continue; | 518 | continue; |
518 | } | 519 | } |
519 | 520 | ||
520 | if (sansa_read_partinfo(sansa,1) < 0) { | 521 | if (sansa_read_partinfo(sansa,1) < 0) { |
522 | sansa_close(sansa); | ||
521 | continue; | 523 | continue; |
522 | } | 524 | } |
523 | 525 | ||
524 | if (is_sansa(sansa) < 0) { | 526 | if (is_sansa(sansa) < 0) { |
525 | continue; | 527 | continue; |
528 | sansa_close(sansa); | ||
526 | } | 529 | } |
527 | 530 | ||
528 | #ifdef __WIN32__ | 531 | #ifdef __WIN32__ |