Opened 8 years ago

Last modified 3 years ago

#714 new defect

FolderContentsResponse error

Reported by: anonymous Owned by: quinox
Priority: normal Milestone: Release 1.3.0
Component: nicotine Version: SVN
Keywords: FolderContentsResponse Cc:

Description

slskmessages.py class FolderContentsResponse?(PeerMessage?): ..

def makeNetworkMessage(self):

.. msg = msg+chr(1)+self.packObject(i[0])+self.packObject(i[1])+self.packObject(0)

change to: msg = msg+chr(1)+self.packObject(i[0])+self.packObject(i[1])

Change History (5)

comment:1 Changed 8 years ago by quinox

I'm sorry, what is this supposed to fix?

comment:2 in reply to:  1 Changed 8 years ago by anonymous

Replying to quinox:

I'm sorry, what is this supposed to fix?

Other users can't decode this msg. So they can't download the folder. Try it yourself.

comment:3 Changed 8 years ago by anonymous

That's precisely why I asked, so I test it :-)

comment:4 Changed 8 years ago by quinox

I appreciate your help, I'm kind of swamped so I have little time to make changes to N+. The reason I wanted to test it myself is that I haven't received any complaints about this section earlier, so I doubted the problem would really be fixed with the removal of a single object.

The original code seems to work okay for me, with an official client I can do a "download from folder" and it will transfer all the files. I do see that the whole FolderContentsResponse? message hasn't been rewritten properly yet. See for example FileSearchRequest?, we should be using

msg += self.packObject(NetworkLongLongType(i[1]))

Where we state explicitly how many bytes should be used for an object. That could explain why this is working on my machine but not on yours. I've made many such changed in the last few months, see http://www.nicotine-plus.org/log/trunk/nicotine%2B/pynicotine/slskmessages.py and then r1409, r1395, r1289.

I suspect all the FolderContentsResponse? objects should be packed as NetworkIntTypes?, I'll try that out later today.

comment:5 Changed 3 years ago by gfarmerfr

Milestone: Release 1.2.17Release 1.3.0
Note: See TracTickets for help on using tickets.