Bug Report: wrong form type in FileTransferNegotiator.java

In http://fisheye.igniterealtime.org/browse/smack/trunk/source/org/jivesoftware/sma ckx/filetransfer/FileTransferNegotiator.java?r=HEAD line 476 the form type gets set to “list-multi”, but according to http://xmpp.org/extensions/xep-0096.html it should be “list-single”.

Changing this enabled file transfers from (a)smack to an client for me. Before that only transfers from an client to (a)smack where working.

Kudos goes to Alexander Ivanov and his github repo at https://github.com/a-iv/smack , where the fix came first to my attention. Take also a look at

maybe this could also be integrated into official smack.


Logged as SMACK-334.

As for the other proposed fixes, please add them as patches (one per issue) along with descriptions.

https://github.com/a-iv/smack/commit/90d6377fdb0a56770dfa2354520ffe4934990162.di ff

This fixes an empty element in an SASL response.

https://github.com/a-iv/smack/commit/0c06a1b16599a0d08e94143529d540935e568f89.di ff

Set file size and name for outgoing file transfer from InputStream.

filetransfer.patch.zip (435 Bytes)
sasl.patch.zip (406 Bytes)

Added as SMACK-335 and SMACK-336.

Thanks for the patches!

We have noticed that setting the Type to TYPE_LIST_SINGLE in SMACK-334 breaks the IBB filetransfer to older Spark clients.

In the smack 3.2.2 alpha for IBB we changed the Type back to TYPE_LIST_MULTI. We would be glad if you would test it in this way.

hi guys,

i made the change with list-single that day. list-multi was wrong implemented during a refatoring of IBB and Socks5-Bytestream. according to xep-0095 the type of stream-methods has to be ‘list-single’. changing it back to list-mutli WILL BREAK filetransfer to other clients! smack is also used for other projects. i think we should keep list-single, as described by xmpp foundation.

maybe you should update your spark…

1 Like

I am also in favor of playing by the rules: http://community.igniterealtime.org/blogs/ignite/2011/09/02/smack-322-beta-fixes -ibb-transfer

I can follow the argument of Flow and Holger. We will go for list-single and live with the breakage for Spark 2.5.8. in IBB file transfers.