diff options
author | Tobias Markmann <tm@ayena.de> | 2015-07-17 08:18:04 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-07-20 11:24:07 (GMT) |
commit | f10bd4cc1f570b27943d27e536d1dcfbcd55ec6a (patch) | |
tree | eaa855d6b961ea70c854db571ace7127a36f9d8c /Swiften/FileTransfer/FileTransferManagerImpl.h | |
parent | 3e982c0a39d1d1833afaf558fc7b0f7aeffd2d64 (diff) | |
download | swift-f10bd4cc1f570b27943d27e536d1dcfbcd55ec6a.zip swift-f10bd4cc1f570b27943d27e536d1dcfbcd55ec6a.tar.bz2 |
Do not reallocate FileTransferManager on connect of Clientswift-3.0beta2
Now Client allocates a FileTransferManager in its ctor and frees
it in its dtor, like all the other resources of the Client class.
This fixes an ASAN crash in the use case where you do a file
transfer, go offline and online again and try to start another
file transfer.
Test-Information:
Tested that the mentioned use case does not crash anymore,
that file transfers still work, and that FileTransferTest still
passes.
Change-Id: Iddbcd8522af7df528bdc2b030fe616ad3f0c4701
Diffstat (limited to 'Swiften/FileTransfer/FileTransferManagerImpl.h')
-rw-r--r-- | Swiften/FileTransfer/FileTransferManagerImpl.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Swiften/FileTransfer/FileTransferManagerImpl.h b/Swiften/FileTransfer/FileTransferManagerImpl.h index de6e857..7a77564 100644 --- a/Swiften/FileTransfer/FileTransferManagerImpl.h +++ b/Swiften/FileTransfer/FileTransferManagerImpl.h @@ -9,39 +9,39 @@ * All rights reserved. * See the COPYING file for more information. */ #pragma once -#include <vector> #include <string> +#include <vector> -#include <boost/filesystem/path.hpp> #include <boost/date_time/posix_time/posix_time.hpp> +#include <boost/filesystem/path.hpp> #include <boost/optional.hpp> #include <Swiften/Base/API.h> +#include <Swiften/Base/IDGenerator.h> #include <Swiften/Base/Override.h> +#include <Swiften/Base/boost_bsignals.h> +#include <Swiften/Elements/S5BProxyRequest.h> #include <Swiften/FileTransfer/FileTransferManager.h> #include <Swiften/FileTransfer/FileTransferOptions.h> -#include <Swiften/Base/boost_bsignals.h> -#include <Swiften/Base/IDGenerator.h> -#include <Swiften/JID/JID.h> -#include <Swiften/FileTransfer/OutgoingFileTransfer.h> #include <Swiften/FileTransfer/IncomingFileTransfer.h> -#include <Swiften/Elements/S5BProxyRequest.h> +#include <Swiften/FileTransfer/OutgoingFileTransfer.h> namespace Swift { class ConnectionFactory; class ConnectionServerFactory; class CryptoProvider; class DomainNameResolver; class EntityCapsProvider; class FileTransferTransporterFactory; class IQRouter; class IncomingFileTransferManager; + class JID; class JingleSessionManager; class NATTraverser; class NetworkEnvironment; class OutgoingFileTransferManager; class PresenceOracle; class ReadBytestream; @@ -86,14 +86,12 @@ namespace Swift { void stop(); private: boost::optional<JID> highestPriorityJIDSupportingFileTransfer(const JID& bareJID); private: - JID ownJID; - OutgoingFileTransferManager* outgoingFTManager; IncomingFileTransferManager* incomingFTManager; FileTransferTransporterFactory* transporterFactory; IQRouter* iqRouter; EntityCapsProvider* capsProvider; PresenceOracle* presenceOracle; |