Bug 33332

Summary: Preview image not set during file transfer
Product: papyon Reporter: Andrea Stagi <stagi.andrea>
Component: generalAssignee: Louis-Francis Ratté-Boulianne <lfrb>
Status: RESOLVED FIXED QA Contact: Louis-Francis Ratté-Boulianne <lfrb>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Modification in papyon.msnp2p.filetransfer.py to show preview
Added control whether preview is present in papyon.msnp2p.filetransfer.py to show preview
Added preview sending
Preview fix in patch format

Description Andrea Stagi 2011-01-21 05:47:17 UTC
Hi everybody, I'm working on Emesene 2 using Papyon libs. I've found a bug regarding preview image during file transfers...Looking at the Papyon code I've found the problem in msnp2p.filetransfer.py. In this file the class FileTransferSession has this method to fetch the context

    def parse_context(self, context):
        try:
            info = struct.unpack("<5I", context[0:20])
            self._size = info[2]
            self._has_preview = not bool(info[4])
            self._filename = unicode(context[20:570], "utf-16-le").rstrip("\x00")
        except:
            raise FTParseError(context)

but preview attribute is not set, and remains constantly None, even if has_preview attribute is True..

Bests
Comment 1 Andrea Stagi 2011-01-23 18:22:24 UTC
Created attachment 42352 [details] [review]
Modification in papyon.msnp2p.filetransfer.py to show preview

Hi all, I've modified file papyon.msnp2p.filetransfer.py to show previews...This patch has been tested successfully in Emesene 2 development. Please, modifiy this file...Regards..
Comment 2 Andrea Stagi 2011-01-24 05:21:07 UTC
Created attachment 42369 [details] [review]
Added control whether preview is present in papyon.msnp2p.filetransfer.py to show preview

Hi all, I missed to control if preview is present before catch it...Bests
Comment 3 Andrea Stagi 2011-01-30 19:02:18 UTC
Created attachment 42731 [details] [review]
Added preview sending

Sending and receiving preview now works well :)
Comment 4 Andrea Stagi 2011-02-21 16:46:27 UTC
Created attachment 43628 [details] [review]
Preview fix in patch format

I've transformed all my modifications in a patch format...

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.