summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/FileTransfer')
-rw-r--r--Swiften/FileTransfer/FileReadBytestream.cpp6
-rw-r--r--Swiften/FileTransfer/FileWriteBytestream.cpp6
-rw-r--r--Swiften/FileTransfer/IncomingJingleFileTransfer.cpp6
-rw-r--r--Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp4
-rw-r--r--Swiften/FileTransfer/JingleFileTransfer.cpp6
-rw-r--r--Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp2
-rw-r--r--Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp4
-rw-r--r--Swiften/FileTransfer/UnitTest/DummyFileTransferTransporterFactory.h2
-rw-r--r--Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp4
9 files changed, 20 insertions, 20 deletions
diff --git a/Swiften/FileTransfer/FileReadBytestream.cpp b/Swiften/FileTransfer/FileReadBytestream.cpp
index 7b7127a..ad9a33b 100644
--- a/Swiften/FileTransfer/FileReadBytestream.cpp
+++ b/Swiften/FileTransfer/FileReadBytestream.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2015 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -16,14 +16,14 @@
namespace Swift {
-FileReadBytestream::FileReadBytestream(const boost::filesystem::path& file) : file(file), stream(NULL) {
+FileReadBytestream::FileReadBytestream(const boost::filesystem::path& file) : file(file), stream(nullptr) {
}
FileReadBytestream::~FileReadBytestream() {
if (stream) {
stream->close();
delete stream;
- stream = NULL;
+ stream = nullptr;
}
}
diff --git a/Swiften/FileTransfer/FileWriteBytestream.cpp b/Swiften/FileTransfer/FileWriteBytestream.cpp
index b07f444..e7daa2c 100644
--- a/Swiften/FileTransfer/FileWriteBytestream.cpp
+++ b/Swiften/FileTransfer/FileWriteBytestream.cpp
@@ -13,14 +13,14 @@
namespace Swift {
-FileWriteBytestream::FileWriteBytestream(const boost::filesystem::path& file) : file(file), stream(NULL) {
+FileWriteBytestream::FileWriteBytestream(const boost::filesystem::path& file) : file(file), stream(nullptr) {
}
FileWriteBytestream::~FileWriteBytestream() {
if (stream) {
stream->close();
delete stream;
- stream = NULL;
+ stream = nullptr;
}
}
@@ -45,7 +45,7 @@ void FileWriteBytestream::close() {
if (stream) {
stream->close();
delete stream;
- stream = NULL;
+ stream = nullptr;
}
}
diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
index 40f952e..526c54c 100644
--- a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp
@@ -44,7 +44,7 @@ IncomingJingleFileTransfer::IncomingJingleFileTransfer(
crypto(crypto),
state(Initial),
receivedBytes(0),
- hashCalculator(NULL) {
+ hashCalculator(nullptr) {
description = initialContent->getDescription<JingleFileTransferDescription>();
assert(description);
JingleFileTransferFileInfo fileInfo = description->getFileInfo();
@@ -62,7 +62,7 @@ IncomingJingleFileTransfer::~IncomingJingleFileTransfer() {
}
delete hashCalculator;
- hashCalculator = NULL;
+ hashCalculator = nullptr;
}
void IncomingJingleFileTransfer::accept(
@@ -325,7 +325,7 @@ void IncomingJingleFileTransfer::stopAll() {
if (state != Initial) {
writeStreamDataReceivedConnection.disconnect();
delete hashCalculator;
- hashCalculator = NULL;
+ hashCalculator = nullptr;
}
switch (state) {
case Initial: break;
diff --git a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp
index f657192..f177304 100644
--- a/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp
+++ b/Swiften/FileTransfer/IncrementalBytestreamHashCalculator.cpp
@@ -19,8 +19,8 @@
namespace Swift {
IncrementalBytestreamHashCalculator::IncrementalBytestreamHashCalculator(bool doMD5, bool doSHA1, CryptoProvider* crypto) {
- md5Hasher = doMD5 ? crypto->createMD5() : NULL;
- sha1Hasher = doSHA1 ? crypto->createSHA1() : NULL;
+ md5Hasher = doMD5 ? crypto->createMD5() : nullptr;
+ sha1Hasher = doSHA1 ? crypto->createSHA1() : nullptr;
}
IncrementalBytestreamHashCalculator::~IncrementalBytestreamHashCalculator() {
diff --git a/Swiften/FileTransfer/JingleFileTransfer.cpp b/Swiften/FileTransfer/JingleFileTransfer.cpp
index 55296f9..53977ec 100644
--- a/Swiften/FileTransfer/JingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/JingleFileTransfer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2015 Isode Limited.
+ * Copyright (c) 2013-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -25,7 +25,7 @@ JingleFileTransfer::JingleFileTransfer(
session(session),
target(target),
transporterFactory(transporterFactory),
- transporter(NULL),
+ transporter(nullptr),
ourCandidateSelectFinished(false),
theirCandidateSelectFinished(false) {
@@ -229,7 +229,7 @@ void JingleFileTransfer::removeTransporter() {
remoteTransportCandidateSelectFinishedConnection.release();
proxyActivatedConnection.release();
delete transporter;
- transporter = NULL;
+ transporter = nullptr;
}
}
diff --git a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
index a5a84eb..c7573c2 100644
--- a/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
+++ b/Swiften/FileTransfer/OutgoingJingleFileTransfer.cpp
@@ -82,7 +82,7 @@ OutgoingJingleFileTransfer::~OutgoingJingleFileTransfer() {
stream->onRead.disconnect(
boost::bind(&IncrementalBytestreamHashCalculator::feedData, hashCalculator, _1));
delete hashCalculator;
- hashCalculator = NULL;
+ hashCalculator = nullptr;
removeTransporter();
}
diff --git a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp
index 2129815..22a07fd 100644
--- a/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp
+++ b/Swiften/FileTransfer/SOCKS5BytestreamServerManager.cpp
@@ -43,7 +43,7 @@ SOCKS5BytestreamServerManager::SOCKS5BytestreamServerManager(
networkEnvironment(networkEnvironment),
natTraverser(natTraverser),
state(Start),
- server(NULL),
+ server(nullptr),
attemptedPortMapping_(false) {
}
@@ -199,7 +199,7 @@ void SOCKS5BytestreamServerManager::stop() {
if (server) {
server->stop();
delete server;
- server = NULL;
+ server = nullptr;
}
if (connectionServer) {
connectionServer->stop();
diff --git a/Swiften/FileTransfer/UnitTest/DummyFileTransferTransporterFactory.h b/Swiften/FileTransfer/UnitTest/DummyFileTransferTransporterFactory.h
index 59fc40a..f3972ab 100644
--- a/Swiften/FileTransfer/UnitTest/DummyFileTransferTransporterFactory.h
+++ b/Swiften/FileTransfer/UnitTest/DummyFileTransferTransporterFactory.h
@@ -185,7 +185,7 @@ public:
}
virtual FileTransferTransporter* createResponderTransporter(const JID& /* initiator */, const JID& /* responder */, const std::string& /* s5bSessionID */, const FileTransferOptions& /* options */) {
- return NULL;
+ return nullptr;
}
private:
diff --git a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
index ceffdb7..9690c09 100644
--- a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamClientSessionTest.cpp
@@ -5,7 +5,7 @@
*/
/*
- * Copyright (c) 2015 Isode Limited.
+ * Copyright (c) 2015-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -57,7 +57,7 @@ public:
void setUp() {
crypto = boost::shared_ptr<CryptoProvider>(PlatformCryptoProvider::create());
destination = "092a44d859d19c9eed676b551ee80025903351c2";
- randomGen.seed(static_cast<unsigned int>(time(NULL)));
+ randomGen.seed(static_cast<unsigned int>(time(nullptr)));
eventLoop = new DummyEventLoop();
timerFactory = new DummyTimerFactory();
connection = boost::make_shared<MockeryConnection>(failingPorts, true, eventLoop);