Commit Graph

40 Commits

Author SHA1 Message Date
arvidn 983b1d6422 provide better names for alert_category_t constants 2020-04-04 15:06:02 -07:00
arvidn 0ce4e576e6 disable wait_for_alert test, since it relies on accurate wall-clock timings, which aren't necessarily possible on some CIs 2019-11-21 08:36:12 +01:00
Arvid Norberg e88339378c merged RC_1_1 into master 2018-06-07 00:30:23 +02:00
arvidn 95cfc16bca fix integer overflow in alert_manager 2018-06-02 15:16:08 +02:00
arvidn c56f6abf72 deliver notification of alerts being dropped via alerts_dropped_alert 2018-05-30 11:26:02 +02:00
Arvid Norberg 4b368e1cfc merged RC_1_1 into master 2018-05-02 01:57:41 +02:00
arvidn 8808eb7cdd introduce a recursive mutex to protect the alert_manager, and hold the mutex while calling user callbacks and plugin hooks. This is required to ensure the underlying storage for alert allocations (in the stack allocators) is synchronized with the thread that may be accessing it 2018-05-01 23:17:51 +02:00
Arvid Norberg 26b0487f0b merged RC_1_1 into master 2018-05-01 21:26:42 +02:00
d-komarov 785f173df3 Revise alert priorities / torrent::on_resume_data_checked issue (#2962)
Most status alerts should have priorities above normal level. Good reason for this is resume data verification case. For a large torrent(having lots of pieces) whole alert queue will be overflowed
with a `piece_finished_alert` right after resume data has been verified. Thus alerts like `torrent_checked_alert`, `torrent_finished`, `state_changed_alert` will not go the alerts queue.
* Introduce alert_priority enumeration
* Bump state_changed_alert's priority
* Set dht_direct_response_alert priority to `critical`
2018-05-01 12:26:37 +02:00
Alden Torres 6d5b90968b fixing warnings in tests code, part4 2018-01-27 09:18:26 +01:00
Alden Torres 8d379dd944 fixing warnings in tests code, part3 2018-01-25 09:09:21 +01:00
arvidn 1c278cc697 add API to query whether alerts have been dropped or not 2017-11-11 15:42:53 +01:00
arvidn b38efb6c65 make alert category flags be a strong type 2017-07-26 07:20:47 -07:00
arvidn d138f02424 introduce lt namespace alias 2017-04-23 23:43:58 -04:00
arvidn 86786770b7 merged RC_1_1 into master 2017-03-27 01:24:43 -04:00
arvidn 910ccc528f deprecate torrent_added_alert in favor of add_torrent_alert 2017-03-26 22:48:17 -04:00
Arvid Norberg 3f1084d63d strengthened type safety in handling of piece and file indices (#1409)
strengthened type safety in handling of piece and file indices
2016-12-22 10:42:33 -05:00
arvidn 6c805bd06d simplify print statements in tests 2016-10-09 20:23:45 -04:00
Alden Torres 7cee486cf7 extensions refactor to use span and std::shared_ptr (#1005)
extensions refactor to use span. use std::shared_ptr instead of boost::shared_ptr.
2016-08-17 14:30:24 -04:00
arvidn 8c8c3d5587 replace boost::function with std::function 2016-08-13 07:07:26 -04:00
Arvid Norberg 8c03718117 apply modernization transforms to headers too. nullptr, explicit constructors, = default (#903) 2016-07-10 14:27:42 -04:00
Arvid Norberg e782783814 modernize use override (#895) 2016-07-09 20:10:38 -04:00
Arvid Norberg 770935cd46 modernize-use-nullptr (#894) 2016-07-09 16:26:26 -04:00
Arvid Norberg eda956f13a use standard library for suspending threads (#855)
use standard library for suspending threads
2016-06-26 09:24:06 -04:00
Arvid Norberg 96999ad67f replace uses of boost::bind with std::bind and lambdas (#745) 2016-05-25 00:31:52 -04:00
Arvid Norberg e8380e1d0b factor out includes from config.hpp into the files actually using it. primarily, printf family of functions, since C++11 version is used now. This removes the need for an snprintf-wrapper on windows (#732) 2016-05-17 09:24:06 -04:00
Arvid Norberg 167cbe74b5 made alerts move-only and remove dispatch function and other deprecated alert functions requiring alert to be copyable (#721) 2016-05-13 08:19:44 -04:00
Arvid Norberg 20b41ad0b9 Threads (#671)
use std::thread, std::mutex, std::condition_variable instead of pulling them in from boost.asio internals.
2016-04-30 18:54:23 -04:00
arvidn 36a5a11ee2 merge fix 2016-04-29 23:34:25 -04:00
Arvid Norberg 95e348bef7 fix name clash with 'thread' on freebsd (#664) 2016-04-29 12:00:39 -04:00
arvidn ae7058e119 remove the timestamps and file sizes from the resume data. This makes saving resume data alot cheaper, since it doesn't have to go via the disk thread. It also removes an old-standing API usage issue where there was easily a race condition introduced between saving resume data and pausing a torrent. 2016-02-06 15:50:55 -05:00
arvidn 68abd7a44d move out test_alert_manager from the main test (as it actually sleeps). also add some debug logging to it 2015-09-06 22:55:41 -04:00
Jakob Petsovits cf9a009fb8 Avoid warnings when building tests. 2015-07-16 14:55:05 -04:00
arvidn ac04ee5ef3 fix typo in settings_pack 2015-06-07 09:23:04 -04:00
Arvid Norberg e35d8d3933 fix unit test 2015-05-31 17:28:37 +00:00
Arvid Norberg c8443d0c7c msvc fixes 2015-05-31 12:21:16 +00:00
Arvid Norberg f9c9d0ad0d merge small unit tests to make running the tests quicker. expand the test framework a bit. add ax_boost_random.m4 script to link against boost.random correctly from makefile. 2015-05-30 04:31:23 +00:00
Arvid Norberg 55a9e98dd0 extend test_alert_manager and clean up test_fast_extension and extend a little bit 2015-04-12 00:14:07 +00:00
Arvid Norberg baaeac7809 extend some unit tests. primarily test_alert_manager and fixed a bug in alert_manager 2015-04-11 18:44:43 +00:00
Arvid Norberg 013ed36f09 landed alert_queue feature branch into trunk 2015-04-03 20:15:48 +00:00