summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-05-07Replace boost::lambda with C++11 lambdasTobias Markmann
Test-Information: Builds on macOS 10.13.4 with clang trunk. All unit and integration tests pass. Produces fewer warnings with clang trunk (previously reported marked-unused-but-used warnings). Change-Id: I849d764537cfbc380155e87b033dc5e517b3c342
2016-11-23Migrate remaining Swiften/Base/foreach.h use to range-based for loopTobias Markmann
Test-Information: Build on macOS 10.12.1 and all tests pass. Change-Id: Iedaa3fa7e7672c77909fd0568bf30e9393cb87e0
2016-10-21Fix data-race in DummyEventLoop::processEvents()Tobias Markmann
Previously DummyEventLoop::processEvents() wrote to the hasEvents_ member without having locked the corresponding mutex. Changed code to use C++11 atomics instead. Test-Information: All unit tests pass on macOS 10.12. Change-Id: I13aa1566d55b7c0098f927e9c8061547f7056f5d
2016-09-29Fix uninitialised class membersTobias Markmann
Initialised previously uninitialised class members. Changed some raw pointers to std::unique_ptr for clearer and automatically initialised code. Test-Information: Builds on macOS 10.12 and unit tests pass in ASAN-enabled build. Change-Id: I7900fe6131119c228ca92c79c0ee8125137f2e48
2016-07-27Fix Doxygen warningsTobias Markmann
This fixes Doxygen warnings about missing parameter documentation or documentation of non-existing parameters. Test-Information: Ran ./scons doc=1 without warnings with Doxygen 1.8.11. Change-Id: I360d042e5c80f418e7574a26fa1283a82fc504d4
2016-04-25Convert hard tabs to four spaces in all our SConscript/*.py filesTobias Markmann
Test-Information: Test that it still builds and unit test pass on OS X 10.11.4. Change-Id: I2eb4a0b707991aee553db36a8cd1ae28b813acab
2016-04-12Use C++11 threading library instead of Boost.ThreadTobias Markmann
This cuts down our dependency on Boost further. Another benefit is that mutex classes of C++11 standard library are recognized by TSAN. Test-Information: Unit and integration tests pass on OS X 10.11.4. Change-Id: Id4dcdb42e3d5155e107ce1d7618acbf26f913b6f
2016-04-04Modernize code to use C++11 shared_ptr instead of Boost'sTobias Markmann
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
2016-03-31Convert tabs to 4 spaces for all source filesTobias Markmann
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
2016-03-30Apply consistent #include grouping and sorting styleTobias Markmann
Changed "" style includes to <> style. Test-Information: Build with Clang 3.9.0 and ran all tests on OS X 10.11.4. Change-Id: Ic05e53f2e5dba39cc1307b116fc5f17b62ab9eb8
2016-02-29Add workaround for building with Boost 1.60 as C++11Tobias Markmann
Test-Information: Successfully built Swiften as C++11 with external Boost 1.60 on OS X 10.11.3. Change-Id: I2c5a7c22f5f8c14ee7befcaeb84b7d1f093932f6
2016-01-25Prevent recursive processing of event queue in EventLoopTobias Markmann
The old event loop had this protection, however it is missing in the new design. This adds this protection again as some external event loop implementations, e.g. the Qt event loop, directly process their event queue from an event handler. Test-Information: Unit and system tests pass on OS X 10.11.3. Change-Id: I10ce7160c3f201e2d5f53ab8289ddde1eb3262e8
2015-12-17Fix misspelled method callTobias Markmann
Test-Information: Builds and tests pass. Change-Id: I7c12036903ea535fe0a7ee7085b2268894c546bd
2015-12-17Process multiple events at once inside EventLoopTobias Markmann
Test-Information: Unit and integration tests pass on OS X 10.10.5 and Debian 8.2. UI remains responsive when transferring a file between two Swift instances. Change-Id: I7841347a5d6c55121e02e274a7087a2fc200f879
2015-12-17Add event loop for integration in Boost ASIOKevin Smith
This allows execution of events inside an existing io_service if an application is already using Boost ASIO for other things and can share the io_service. Test-Information: Builds on OS X 10.11.2. Change-Id: I092ed7a25b24ef95d4664bae98ed84cc0f149073
2015-11-19Redesign event loops to be thread-safe and deterministicTobias Markmann
The new event loop design has a single event queue that is synchronized to protect against data races. The removal of events in the queue by EventOwner is deterministic. Test-Information: All unit and integration tests with TSAN and cxxflags=-DBOOST_SP_USE_PTHREADS on Debian 8.2 pass without reports. Multiple Swiften/QA/ClientTest/ClientTest runs under different CPU stress caused no TSAN reports on Debian 8.2. Swift itself only causes TSAN reports related to Qt itself, out of our control, and most likely false positives, i.e. TSAN not detecting the synchronization method inside Qt correctly. Unit tests pass without errors and successfully connected to Slimber on OS X 10.10.5. Change-Id: Ia1ed32ac2e758c5b9f86e0dac21362818740881e
2015-02-09Fix data race in DummyEventLoop and BoostConnection(Server)Test reported by TSANTobias Markmann
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
2015-02-03Stlye fix and declaring EventLoop implementations' dtors as virtual.Tobias Markmann
Test-Information: Unit tests run successfully. Change-Id: I5df196c8bc642eeff4997558c3c56c6fa03bef16
2014-12-15Update Copyright in SwiftenKevin Smith
Change-Id: I94ab4bbb68c603fe872abeb8090575de042f5cb4
2014-11-17Compile Cocoa event loop in xcode tooKevin Smith
Change-Id: I2494ca43f30c3a7e90fe38f20df421e53972974c
2014-10-01Port many of Isode's local fixes upstreamKevin Smith
Includes fixes to: Build with new Visual Studio and Boost Avoid error caused when Avahi is present but Qt is not Make declaration of XMPPRosterImpl::addContact consistent with implementation Includes enhancements to: Allow user-configurable mt.exe Allow splitting openssl paths Allow disabling gconf lookup Make idn support optional Allow disabling various library detections Remove use of non-Python2.4 features in sconscripts Test-Information: Builds Change-Id: Iee91ee80291a8bdf87cc169c915e4dad1cc1055b
2013-09-08Use (deprecated) declaration of ivars in interfaceRemko Tronçon
This is necessary for supporting 'legacy' Objective-C runtimes (e.g. OS X 32-bit). Partly reverts 88153286ea2f11fea24b950e7dbb0075ceb49a54. Change-Id: Ibc6e1dad255ae8e36b946ef4c792c0f272c73d71
2013-08-16Fix double includes in EventLoop.Remko Tronçon
Change-Id: Icd510a0737c46618acedc311b1b4e24b72d6673d
2013-08-16Merge branch 'swift-2.x'Remko Tronçon
Change-Id: I36e82dfe1ec492df719bcc85e5549fb4013a6723
2013-08-16Added missing lock_guard include.Remko Tronçon
Change-Id: I1ea6c42292b7c3b5f0ecdc1395b9c8e8cf17a6b9
2013-08-15Getting rid of "-Wobjc-interface-ivars" warnings from clang.Tobias Markmann
Move instance variables to implementation because they are deprecated to have in the interface. Requires 'Modern' obj-c runtime. Change-Id: I60d693b7966e08ccc003818ab51ea3633c90ae17 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2013-08-13Adding basic support for Android and Unbound (No IPv6 yet).Tobias Markmann
Change-Id: I1d74324515b20e0dc3d0ef4aa2f556fea7b4bee3 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.s
2013-02-12Include boost::lock_guard include.Remko Tronçon
Change-Id: Iad90ae18911116603888ee5dc332151c24a7cf60
2012-12-30Enable & fix pedantic CLang warnings.Remko Tronçon
Change-Id: I70109624b4bd7aab9ba679a3eaabc225dd64a03a
2012-12-23Replace functors and for loops by boost::lambdas.Remko Tronçon
Change-Id: I6d2364dc85464f238d95978793f35953a2947799
2012-11-12Use more efficient empty check.Remko Tronçon
Change-Id: I8690af82a7f73d3883057b2a58a19197d6b09842
2012-07-14Initial DLL support for Swiften.Remko Tronçon
All applications succesfully link against Swiften.dll.
2011-11-03* Added Schannel support.dreijer
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
2011-10-05Don't crash with label item without a labelKevin Smith
2011-06-13Added CppCheck script.Remko Tronçon
Tweaked the sources to satisfy cppcheck.
2011-06-13Fixed some CppCheck warnings.Remko Tronçon
2011-04-30Replace #icnlude "" by #include <> in Swiften.Remko Tronçon
2011-04-18Assert on empty event in event loop.Remko Tronçon
2011-04-18Cleaned up includes.swift-2.0alphaRemko Tronçon
2011-03-28Catch all exceptions in event loop.Remko Tronçon
2011-03-16Added possibility to dynamically link Swiften.Remko Tronçon
Resolves: #798
2011-02-27Temporarily disabling SimpleEventLoopTest::testRun.Remko Tronçon
2011-02-26Some more cleanups.Remko Tronçon
2011-02-24Added debugging switch to Sluift.Remko Tronçon
2011-02-15Moved QtEventLoop to the Swift namespace.Remko Tronçon
2011-01-22Some small event loop tweaks.Remko Tronçon
2011-01-21Code cleanup.Remko Tronçon
2011-01-18Cleaned up some code.Remko Tronçon
2010-12-27Added event debugging methods.Remko Tronçon
2010-12-27Fixed valgrind warnings & leaks.Remko Tronçon