mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
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
This commit is contained in:
parent
97a143279b
commit
08574c43d3
2 changed files with 8 additions and 0 deletions
|
@ -1292,23 +1292,28 @@ int ipod_scan(struct ipod_t* ipod)
|
||||||
if(result == -2) {
|
if(result == -2) {
|
||||||
denied++;
|
denied++;
|
||||||
}
|
}
|
||||||
|
ipod_close(ipod);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (read_partinfo(ipod,1) < 0) {
|
if (read_partinfo(ipod,1) < 0) {
|
||||||
|
ipod_close(ipod);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ipod->pinfo[0].start==0) || (ipod->pinfo[0].type != 0)) {
|
if ((ipod->pinfo[0].start==0) || (ipod->pinfo[0].type != 0)) {
|
||||||
|
ipod_close(ipod);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (read_directory(ipod) < 0) {
|
if (read_directory(ipod) < 0) {
|
||||||
|
ipod_close(ipod);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ipod_version=(ipod->ipod_directory[0].vers>>8);
|
ipod_version=(ipod->ipod_directory[0].vers>>8);
|
||||||
if (getmodel(ipod,ipod_version) < 0) {
|
if (getmodel(ipod,ipod_version) < 0) {
|
||||||
|
ipod_close(ipod);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -514,15 +514,18 @@ int sansa_scan(struct sansa_t* sansa)
|
||||||
if(result == -2) {
|
if(result == -2) {
|
||||||
denied++;
|
denied++;
|
||||||
}
|
}
|
||||||
|
sansa_close(sansa);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sansa_read_partinfo(sansa,1) < 0) {
|
if (sansa_read_partinfo(sansa,1) < 0) {
|
||||||
|
sansa_close(sansa);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_sansa(sansa) < 0) {
|
if (is_sansa(sansa) < 0) {
|
||||||
continue;
|
continue;
|
||||||
|
sansa_close(sansa);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __WIN32__
|
#ifdef __WIN32__
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue