|
From: Marcus M. <ma...@je...> - 2009-08-26 17:30:21
|
On Wed, Aug 26, 2009 at 12:35:49AM +0200, Marcus Meissner wrote: > On Tue, Aug 25, 2009 at 06:41:45PM +0200, Linus Walleij wrote: > > 2009/8/25 Marcus Meissner <mei...@su...>: > > > > > I found another flaw in my code. The list after metadata fast > > > reading needs to be sorted, otherwise the later code might > > > not find stuff again (due to the binary search used). > > > > OK patch applied, can you test again Nyall, if we run out of ideas > > I'll just tag all Sony's with the bug flag to speed them up. > > It could be that these ops are actually just slow compared > > to getting the objinfos one object at a time, since that's how > > Windows does it anyway. So ... Excuse me while I put a brown paperbag on my head ... My new code is so good in on-demand loading of information I never noticed that the fast load method did not set "nrofobjects" in the end. With my iRiver T10a this finally makes it work (and I actually looked at debugging information this time ;). (Curious enough, the T10a works for me with the "get all" method... Any idea why it is marked not working?) Ciao, Marcus Index: libmtp.c =================================================================== RCS file: /cvsroot/libmtp/libmtp/src/libmtp.c,v retrieving revision 1.313 diff -u -r1.313 libmtp.c --- libmtp.c 25 Aug 2009 16:38:42 -0000 1.313 +++ libmtp.c 26 Aug 2009 17:28:12 -0000 @@ -2246,7 +2246,7 @@ } /* mark last entry also */ params->objects[i].flags |= PTPOBJECT_OBJECTINFO_LOADED; - + params->nrofobjects = i+1; /* The device might not give the list in linear ascending order */ ptp_objects_sort (params); return 0; |