Bug with file transfer to anonymous login

Greetings!

I’m using smack (3.1) in a java application run on many machines throughout our network. Each machine (behind the scenese) connects to an open fire server anonymously and joins a pre-defined chat room. All communication is sent either through the chat room or by creating direct chat with a user based on their chatroom JID. Everything works great until I try to transfer files.

I can transfer a file perfectly when sending to an authenticated user (user@server/smack).

There are problems when I try to send a file to a user in a chat room (room@conference.server/nickname).

I’ve debugged this a bit. I believe the issue to be on the sending end. Here’s what I’ve found…

In the method OutgoingFileTransfer.sendFile(File, String), it tries to get an outputStream by calling negotiateStream() (line 214). This is returning null.

The negotiateStream() method returns null because when it eventually gets to Socks5TransferNegotiator.initBytestreamSocket(String, String, String), calling createDigest() on line 299/300 returns a String that does not match any key in the socket hashmap. I know this because in the waitForUsedHostResponse(…) method, calling proxy.getSocket() on line 355 does not return a socket.

So, because of all the above, the sender class is never able to communicate back to the receiving class that it’s ready to send a file.

Ok, any ideas on a work around? Is this something that can be fixed any time soon?

Thanks all for a great API. Works well for the most part!

Ok, after doing some more research, I found a very helpful post that said to get the Occupant for a user in the room, then use the occupant’s jid to do the transfer. It works!

I suppose my only complaint at this point is that the exceptions and/or errors are not descriptive enough to tell you what the problem is.