Commit Graph

56 Commits

Author SHA1 Message Date
arvidn 550d3c7d9f update copyright headers 2022-06-22 21:42:55 +02:00
arvidn 9b957f6268 use user defined literal for piece_index_t in tests 2021-03-22 14:08:53 +01:00
arvidn de8e69a795 simplify tests by defining a user defined literal for file_index_t 2021-03-21 03:32:58 +01:00
arvidn 7f8db57cf7 fix warning in test_alert_manager 2020-12-27 02:47:57 +01:00
Arvid Norberg 3b96033dff merged RC_1_2 into RC_2_0 2020-10-09 14:47:14 +02:00
arvidn d622951256 add build option to disable human readable strings in alerts. The idea is to save a bit more space for builds that don't need to produce human readable logs 2020-10-09 11:53:21 +02:00
arvidn 5935f63ead update copyrights 2020-09-01 05:14:17 -07:00
arvidn 3e110385d9 merged RC_1_2 into RC_2_0 2020-07-12 01:51:09 +02:00
arvidn 82521eb1ae fixed issue where pop_alerts() could return old, invalid alerts 2020-07-10 12:25:56 -07:00
arvidn a799ffb1a4 merge RC_1_2 into master 2020-04-05 18:38:45 +02:00
arvidn 983b1d6422 provide better names for alert_category_t constants 2020-04-04 15:06:02 -07:00
Alden Torres f0a2e11748 moved alert_manager to aux 2020-03-27 12:08:14 -07:00
arvidn a0b9918584 add a type-safe wrapper around clientdata 2019-12-30 19:30:37 +01:00
ghbplayer e0eecd78f0 add clientdata to torrents and ATP 2019-12-30 19:30:37 +01:00
arvidn c05a815319 merged RC_1_2 into master 2019-11-21 12:19:39 +01: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
arvidn d3f7a363c2 update copyright year 2019-08-29 00:13:04 +02:00
Steven Siloti 86be4287d3 add info hash type 2019-08-10 09:28:38 -07: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