Comment 2 for bug 575091

Revision history for this message
Fergal Daly (fergal) wrote :

It seems the python code is out of sync with the C code. In particular, there are fields missing from the python struct definitions with the result that the "next" field is often incorrect, leading to following a bad pointer (not a pointer at all actually).

I've attached a patch that adds the missing "modificationdate" field to 2 of the structs. I don't know if this fixes everything but it certainly turns

python -c 'import pymtp;m=pymtp.MTP();m.connect();print m.get_filelisting(); m.disconnect()'

into something that doesn't segfault anymore. It also makes deviceinfo execute to completion too.