summaryrefslogtreecommitdiffstats
path: root/rbutil/ipodpatcher
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-06-30 19:01:51 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-06-30 19:01:51 +0000
commit08574c43d314cf9ac189e2d2c6467bca6ed9e97e (patch)
tree8e5e8d9e9ff725a97e18ceae94920bb3d7c401ce /rbutil/ipodpatcher
parent97a143279b78799d722e3f992e1a59e32ef3c489 (diff)
downloadrockbox-08574c43d314cf9ac189e2d2c6467bca6ed9e97e.tar.gz
rockbox-08574c43d314cf9ac189e2d2c6467bca6ed9e97e.tar.bz2
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/ipodpatcher')
-rw-r--r--rbutil/ipodpatcher/ipodpatcher.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rbutil/ipodpatcher/ipodpatcher.c b/rbutil/ipodpatcher/ipodpatcher.c
index 2177320f2a..73467dea34 100644
--- a/rbutil/ipodpatcher/ipodpatcher.c
+++ b/rbutil/ipodpatcher/ipodpatcher.c
@@ -1292,23 +1292,28 @@ int ipod_scan(struct ipod_t* ipod)
if(result == -2) {
denied++;
}
+ ipod_close(ipod);
continue;
}
if (read_partinfo(ipod,1) < 0) {
+ ipod_close(ipod);
continue;
}
if ((ipod->pinfo[0].start==0) || (ipod->pinfo[0].type != 0)) {
+ ipod_close(ipod);
continue;
}
if (read_directory(ipod) < 0) {
+ ipod_close(ipod);
continue;
}
ipod_version=(ipod->ipod_directory[0].vers>>8);
if (getmodel(ipod,ipod_version) < 0) {
+ ipod_close(ipod);
continue;
}