zD12 / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

DCC files are not received #192

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Send a file with /dcc send to a PircBotX
2. Accept transfer in a IncomingFileTransferEvent with event.accept(File)
3. Watch the value of event.getBytesTransfered()

What is the expected output? What do you see instead?
Expected: File is transferred properly, getBytesTransfered() value increases 
during the transfer.
Actual: An empty file is created at the destination, getBytesTransfered() stays 
at 0. The sender seems to send a 64kB chunk of data. getTransferToken() is 
null. (related to #159 ?)

What version of the product are you using? On what operating system?
2.1-SNAPSHOT (7c6a24607e9c), Linux x64, Java 7

Please provide any additional information below.
This is not a server issue, I was able to transfer DCC files between users 
being on the same endpoints as my client/PircBotX setup.
Also, this might be a documentation flaw, but event.accept() is not blocking.

Original issue reported on code.google.com by shellgra...@gmail.com on 29 Jul 2014 at 11:30

GoogleCodeExporter commented 9 years ago
Did you call transfer() after you accepted? Otherwise you'll have the 
connection open but nothing to read the data

It's not your fault if you didn't though. For some reason the DccExplained wiki 
page doesn't show calling it. It's been updated now

Also accept() does block until it can connect to the user (standard DCC) or the 
user connects to the bot (passive DCC). 

Please let me know if this doesn't fix your issue and I'll reopen this

Original comment by Lord.Qua...@gmail.com on 31 Aug 2014 at 8:12

GoogleCodeExporter commented 9 years ago
That does work indeed, I didn't notice that it was needed at all. Thanks for 
the reply.

Original comment by shellgra...@gmail.com on 1 Sep 2014 at 1:41