Age | Commit message (Collapse) | Author |
|
Previously HostAddress had a constructor which allowed
initialisation via a std::string. This initialisation can
fail and this is heavily used for checking whether a string
is a valid IP address.
This constructor is removed in this commit and replaced by
a static method HostAddress::fromString, taking a string and
returning an optional HostAddress. This clearly communicates
that the conversion can fail.
Test-Information:
./scons test=all passes on macOS 10.12.1.
Change-Id: Idaafee6f84010ce541c55f267ac77ad6ac8f02b4
|
|
This change was done by applying the following 'gsed'
replacement calls to all source files:
's/\#include <boost\/shared_ptr\.hpp>/\#include <memory>/g'
's/\#include <boost\/enable_shared_from_this\.hpp>/\#include <memory>/g'
's/\#include <boost\/smart_ptr\/make_shared\.hpp>/\#include <memory>/g'
's/\#include <boost\/make_shared\.hpp>/\#include <memory>/g'
's/\#include <boost\/weak_ptr\.hpp>/\#include <memory>/g'
's/boost::make_shared/std::make_shared/g'
's/boost::dynamic_pointer_cast/std::dynamic_pointer_cast/g'
's/boost::shared_ptr/std::shared_ptr/g'
's/boost::weak_ptr/std::weak_ptr/g'
's/boost::enable_shared_from_this/std::enable_shared_from_this/g'
The remaining issues have been fixed manually.
Test-Information:
Code builds on OS X 10.11.4 and unit tests pass.
Change-Id: Ia7ae34eab869fb9ad6387a1348426b71ae4acd5f
|
|
Removed trailing spaces and whitespace on empty lines
in the process.
Changed CheckTabs.py tool to disallow hard tabs in source
files.
Test-Information:
Manually checked 30 random files that the conversion worked
as expected.
Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
|
|
Use values instead of define names for _WIN32_WINNT and
NTDDI_VERSION defined needed for Windows.h configuration.
Using the names boost fails to correctly detect getaddrinfo()
support on Windows.
Only run IPv6 related test cases in DomainNameResolverTest on
Windows, if test_ipv6=1 is passed to the scons arguments.
This is because on Windows getaddrinfo() will not return
IPv6 related results when called with the AF_UNSPEC hint,
unless the Windows host has global IPv6 connectivity.
Changed the BoostConnectionTest to time out and not endlessly
wait on a response from the remote host.
Test-Information:
Ran the following test configurations:
* (SUCCESS) On Windows 8 with HE.net IPv6 tunnel to provide
full IPv6 connectiviy:
scons.bat test=system test_ipv6=1 Swiften/QA/NetworkTest
* (SUCCESS) On Windows 8 with HE.net IPv6 tunnel to provide
full IPv6 connectiviy:
scons.bat test=system Swiften/QA/NetworkTest
* (EXPECTED FAIL) On Windows 8 with no IPv6 connectiviy:
scons.bat test=system test_ipv6=1 Swiften/QA/NetworkTest
* (SUCCESS) On Windows 8 with no IPv6 connectiviy:
scons.bat test=system Swiften/QA/NetworkTest
Change-Id: I5adcd28e09e22acf61f7cca40b614e71df75dd70
|
|
Introducing SWIFT_NETWORK_TEST_IPV4 and SWIFT_NETWORK_TEST_IPV6 for
the host addresses used in BoostConnectionTest.cpp.
Passing these variables and ASAN/LSAN_OPTIONS for memory leak
detection when calling the test from SCons.
Test-Information:
Tested on Elementary OS with correct available hosts and unavailable
hosts. In both cases the behavior is the same as before.
Change-Id: I24128c766642c5a2ee273f7c11624525ae33e270
|
|
The data race is on the events_ member in DummyEventLoop.
A BoostIOServerThread can post events to the DummyEventLoop and thereby
access its events_ data member while the test's main code processes
events of the loop.
To prevent access to the DummyEventLoop by the BoostIOServiceThread
after the DummyEventLoop is deleted, the BoostIOServiceThread is
deleted before the DummyEventLoop.
Process remaining events in BoostConnectionTest::tearDown like we do in
BoostConnectionServerTest::tearDown.
Test-Information:
Run multiple times on NetworkTest as TSAN enabled build on Linux.
Without the patch it reports a data race for the events_ deque member.
Change-Id: I3c85535338fc0ce0263dbfc3534aceb1dd09c137
|
|
Change-Id: I94ab4bbb68c603fe872abeb8090575de042f5cb4
|
|
Change-Id: I533b3ecf5ddc32f6163d32ad3a9d9d012c981997
|
|
Change-Id: I0fc27a08adb6aecd5c5775a52b7fe48570ed526a
|
|
This should avoid unnecessary copying of the received data
while being processed by the event loop.
|
|
|
|
|
|
|
|
|
|
This should avoid problems when destroying an event loop containing
timer or network events, after the network factory (and io_service
object) has disappeared (i.e. at shutdown).
|
|
|
|
times simultaniously.
|
|
|
|
|
|
The event loop now needs to be explicitly passed to clients
using it.
|
|
BoostTimer isn't supposed to be constructed as a non-shared-ptr. Making
constructor private to avoid this error in the future.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ClientSession no longer sets up a connection.
Connection no longer resolves addresses.
|
|
|
|
|
|
BoostConnections no longer have their own thread, but are managed from
a central Boost IO thread instead.
|
|
|