From c25194ae967fc5d1cfd9b795fa5cb65463df83ad Mon Sep 17 00:00:00 2001 From: Sergey I Date: Fri, 11 Nov 2011 13:26:24 +0000 Subject: [PATCH] Fixed: choose filetransfer transport by priority (thanks Dealer_WeARE) git-svn-id: http://delta.affinix.com/svn/trunk/iris@813 ac7a513c-5e3a-0410-af42-968c3ac6e7dc --- src/xmpp/xmpp-im/filetransfer.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/xmpp/xmpp-im/filetransfer.cpp b/src/xmpp/xmpp-im/filetransfer.cpp index 88edce6..18eddd8 100644 --- a/src/xmpp/xmpp-im/filetransfer.cpp +++ b/src/xmpp/xmpp-im/filetransfer.cpp @@ -438,11 +438,13 @@ void FileTransferManager::setDisabled(const QString &ns, bool state) void FileTransferManager::pft_incoming(const FTRequest &req) { QString streamType; - foreach (const QString &ns, req.streamTypes) { - BytestreamManager *manager = streamManager(ns); - if (manager && manager->isAcceptableSID(req.from, req.id)) { - streamType = ns; - break; + foreach(const QString& ns, d->streamPriority) { + if(req.streamTypes.contains(ns)) { + BytestreamManager *manager = streamManager(ns); + if (manager && manager->isAcceptableSID(req.from, req.id)) { + streamType = ns; + break; + } } } -- 2.11.4.GIT