|
From: Linus W. <lin...@gm...> - 2008-04-20 03:21:51
|
2008/4/18 Chris Bagwell <ch...@cn...>: > The way ptp_getobjecthandles() is coded, it treats the PTP_ERROR_IO > return from correct header as a non-error and return 0 objecthandles; I > guess so it can advance to next disk in hopes its not corrupt. This > left a lot of filesystem data to be processed that the device was still > returning. Future calls to get getdata_func() was getting unrelated > filename data as its response. This confused things greatly and was > what caused my device to require hard reboot to recover. Aha... > That libusb-glue part of code refers to a work around flag > DEVICE_FLAG_IGNORE_HEADER_ERRORS. So I tried it. This stops my device > from locking up but gives a totally new and bad behavior. For some > reason it reads lots of data from the device but mtp-detect exits with > no error message before it prints even "Detect: Successfully connected 1 > devices". DEVICE_FLAG_IGNORE_HEADER_ERRORS does not ignore errors reported in the header, it ignores erroneous (malformed) headers and tries to repair them. I think it's probably a totally broken getobjproplist we're dealing with and the BROKEN flags need to be used, so we keep it as it is right now. Thanks for debugging! Linus |