Smack File Transfer vs Adium (Mac os x) or Pidgin(PC)

Hi, all!

I work on jabber client based on Smack (3.0.4) lib and have some problem with file transport beetween my client and Adium (Mac os x) or Pidgin(PC).For jabber server i use Openfire (3.4.5).

Then i login with user “root” on my client and user “demo” login with Pidgin to Openfire and “demo” try send file to “root” in first time i always get error like this “File Send Failed. Unable to send file to root@localhost/Smack, user does not support file transfers” (add screenshot in attach) but then “demo” try send file again all works fine. Same result with Adium. I try other client (Spark, Gajim, Kopete, Psi) and don’t get error like that.

My code:

this.connection_ = new XMPPConnection(XMPPMessenger.getConnectionConfiguration());
this.username_ = username;
try {
  connection_.connect();
  connection_.login(username, password, "Smack", true);
  fileTransferManager = new FileTransferManager(connection_);

  fileTransferManager.addFileTransferListener(new FileTransferListener() {
    public void fileTransferRequest(FileTransferRequest request) {
      try {

// accept or reject file
} catch (Exception e) {
if (log.isDebugEnabled())
e.printStackTrace();
}
}
});

And that i see in Pidgin XMPP Console then send file first time :

<iq type=‘get’ id=‘purple4c38000’ to=‘root@localhost/Smack’>
<query xmlns=‘http://jabber.org/protocol/disco#info’/>
</iq>
<iq id=‘purple4c38000’ to=‘demo@localhost/Home’ type=‘result’ from=‘root@localhost/Smack’>
<query xmlns=‘http://jabber.org/protocol/disco#info’>
<identity category=‘client’ name=‘Smack’ type=‘pc’/>
</query>
</iq>
<iq id=‘purple4c38000’ to=‘demo@localhost/Home’ type=‘result’ from=‘root@localhost/Smack’>
<query xmlns=‘http://jabber.org/protocol/disco#info’>
<identity category=‘client’ name=‘Smack’ type=‘pc’/>
<feature var=‘http://jabber.org/protocol/xhtml-im’/>
<feature var=‘http://jabber.org/protocol/muc’/>
<feature var=‘http://jabber.org/protocol/si/profile/file-transfer’/>
<feature var=‘http://jabber.org/protocol/si’/>
<feature var=‘http://jabber.org/protocol/bytestreams’/>
<feature var=‘http://jabber.org/protocol/ibb’/>
</query>
</iq>
<iq type=‘get’ id=‘purple4c38001’>
<ping xmlns=‘urn:xmpp:ping’/>
</iq>
<iq type=‘error’ id=‘purple4c38001’ to=‘demo@localhost/Home’>
<ping xmlns=‘urn:xmpp:ping’/>
<error code=‘503’ type=‘cancel’>
<service-unavailable xmlns=‘urn:ietf:params:xml:ns:xmpp-stanzas’/>
</error>
</iq>

Any idea?

Thanks a lot!

Vetaly.