Bug in FileTransferManager

protected void rejectIncomingFileTransfer(FileTransferRequest request) {
    StreamInitiation initiation = request.getStreamInitiation();
    IQ rejection = FileTransferNegotiator.createIQ(
            initiation.getPacketID(), initiation.getFrom(), initiation.getTo(), IQ.Type.ERROR);
            rejection.setError(new XMPPError(XMPPError.Condition.forbbidden));
          connection.sendPacket(rejection);
}

should change to:

protected void rejectIncomingFileTransfer(FileTransferRequest request) {
                    StreamInitiation initiation = request.getStreamInitiation();                     IQ rejection = FileTransferNegotiator.createIQ(
                                        initiation.getPacketID(), initiation.getFrom(), initiation
                                                            .getTo(), IQ.Type.ERROR);
                    rejection.setError(new XMPPError(XMPPError.Condition.no_acceptable));
                    connection.sendPacket(rejection);
}

Added SMACK-346. Can you please add a reference to the relevant section of the specification.

http://xmpp.org/extensions/xep-0065.html#direct-proto-initiate

Else if the Target is unwilling to accept the bytestream, it MUST return an error of to the Requester.

Example 12. Target Refuses Bytestream

<iq from='target@example.org/bar'
    id='hu3vax16'
    to='requester@example.com/foo'
    type='error'>
  <error type='modify'>
    <not-acceptable
        xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
  </error>
</iq>