summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-07-17 08:18:04 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-07-20 11:24:07 (GMT)
commitf10bd4cc1f570b27943d27e536d1dcfbcd55ec6a (patch)
treeeaa855d6b961ea70c854db571ace7127a36f9d8c /Swiften/FileTransfer/FileTransferManagerImpl.h
parent3e982c0a39d1d1833afaf558fc7b0f7aeffd2d64 (diff)
downloadswift-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.h16
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
@@ -10,37 +10,37 @@
10 * See the COPYING file for more information. 10 * See the COPYING file for more information.
11 */ 11 */
12 12
13#pragma once 13#pragma once
14 14
15#include <vector>
16#include <string> 15#include <string>
16#include <vector>
17 17
18#include <boost/filesystem/path.hpp>
19#include <boost/date_time/posix_time/posix_time.hpp> 18#include <boost/date_time/posix_time/posix_time.hpp>
19#include <boost/filesystem/path.hpp>
20#include <boost/optional.hpp> 20#include <boost/optional.hpp>
21 21
22#include <Swiften/Base/API.h> 22#include <Swiften/Base/API.h>
23#include <Swiften/Base/IDGenerator.h>
23#include <Swiften/Base/Override.h> 24#include <Swiften/Base/Override.h>
25#include <Swiften/Base/boost_bsignals.h>
26#include <Swiften/Elements/S5BProxyRequest.h>
24#include <Swiften/FileTransfer/FileTransferManager.h> 27#include <Swiften/FileTransfer/FileTransferManager.h>
25#include <Swiften/FileTransfer/FileTransferOptions.h> 28#include <Swiften/FileTransfer/FileTransferOptions.h>
26#include <Swiften/Base/boost_bsignals.h>
27#include <Swiften/Base/IDGenerator.h>
28#include <Swiften/JID/JID.h>
29#include <Swiften/FileTransfer/OutgoingFileTransfer.h>
30#include <Swiften/FileTransfer/IncomingFileTransfer.h> 29#include <Swiften/FileTransfer/IncomingFileTransfer.h>
31#include <Swiften/Elements/S5BProxyRequest.h> 30#include <Swiften/FileTransfer/OutgoingFileTransfer.h>
32 31
33namespace Swift { 32namespace Swift {
34 class ConnectionFactory; 33 class ConnectionFactory;
35 class ConnectionServerFactory; 34 class ConnectionServerFactory;
36 class CryptoProvider; 35 class CryptoProvider;
37 class DomainNameResolver; 36 class DomainNameResolver;
38 class EntityCapsProvider; 37 class EntityCapsProvider;
39 class FileTransferTransporterFactory; 38 class FileTransferTransporterFactory;
40 class IQRouter; 39 class IQRouter;
41 class IncomingFileTransferManager; 40 class IncomingFileTransferManager;
41 class JID;
42 class JingleSessionManager; 42 class JingleSessionManager;
43 class NATTraverser; 43 class NATTraverser;
44 class NetworkEnvironment; 44 class NetworkEnvironment;
45 class OutgoingFileTransferManager; 45 class OutgoingFileTransferManager;
46 class PresenceOracle; 46 class PresenceOracle;
@@ -87,12 +87,10 @@ namespace Swift {
87 87
88 private: 88 private:
89 boost::optional<JID> highestPriorityJIDSupportingFileTransfer(const JID& bareJID); 89 boost::optional<JID> highestPriorityJIDSupportingFileTransfer(const JID& bareJID);
90 90
91 private: 91 private:
92 JID ownJID;
93
94 OutgoingFileTransferManager* outgoingFTManager; 92 OutgoingFileTransferManager* outgoingFTManager;
95 IncomingFileTransferManager* incomingFTManager; 93 IncomingFileTransferManager* incomingFTManager;
96 FileTransferTransporterFactory* transporterFactory; 94 FileTransferTransporterFactory* transporterFactory;
97 IQRouter* iqRouter; 95 IQRouter* iqRouter;
98 EntityCapsProvider* capsProvider; 96 EntityCapsProvider* capsProvider;