renamed debug_notification to connect_notification

This commit is contained in:
arvidn 2018-09-28 10:18:34 -07:00 committed by Arvid Norberg
parent 109db58641
commit c437a24d78
8 changed files with 16 additions and 9 deletions

View File

@ -1,3 +1,4 @@
* renamed debug_notification to connect_notification
* when updating listen sockets, only post alerts for new ones
* deprecate anonymous_mode_alert
* deprecated force_proxy setting (when set, the proxy is always used)

View File

@ -280,9 +280,10 @@ void bind_alert()
s.attr("port_mapping_notification") = alert::port_mapping_notification;
s.attr("storage_notification") = alert::storage_notification;
s.attr("tracker_notification") = alert::tracker_notification;
s.attr("debug_notification") = alert::debug_notification;
s.attr("connect_notification") = alert::connect_notification;
s.attr("status_notification") = alert::status_notification;
#if TORRENT_ABI_VERSION == 1
s.attr("debug_notification") = alert::debug_notification;
s.attr("progress_notification") = alert::progress_notification;
#endif
s.attr("ip_block_notification") = alert::ip_block_notification;

View File

@ -1095,7 +1095,7 @@ example alert_masks:
| alert::port_mapping_notification
| alert::storage_notification
| alert::tracker_notification
| alert::debug_notification
| alert::connect_notification
| alert::status_notification
| alert::ip_block_notification
| alert::performance_warning

View File

@ -123,7 +123,10 @@ namespace libtorrent {
static constexpr alert_category_t tracker_notification = 4_bit;
// Low level alerts for when peers are connected and disconnected.
static constexpr alert_category_t debug_notification = 5_bit;
static constexpr alert_category_t connect_notification = 5_bit;
#if TORRENT_ABI_VERSION == 1
static constexpr alert_category_t TORRENT_DEPRECATED_MEMBER debug_notification = connect_notification;
#endif
// Enables alerts for when a torrent or the session changes state.
static constexpr alert_category_t status_notification = 6_bit;

View File

@ -757,7 +757,7 @@ TORRENT_VERSION_NAMESPACE_2
TORRENT_DEFINE_ALERT(peer_connect_alert, 23)
static constexpr alert_category_t static_category = alert::debug_notification;
static constexpr alert_category_t static_category = alert::connect_notification;
std::string message() const override;
int const socket_type;
@ -775,7 +775,7 @@ TORRENT_VERSION_NAMESPACE_2
TORRENT_DEFINE_ALERT(peer_disconnected_alert, 24)
static constexpr alert_category_t static_category = alert::debug_notification;
static constexpr alert_category_t static_category = alert::connect_notification;
std::string message() const override;
// the kind of socket this peer was connected over

View File

@ -60,9 +60,10 @@ namespace libtorrent {
constexpr alert_category_t alert::port_mapping_notification;
constexpr alert_category_t alert::storage_notification;
constexpr alert_category_t alert::tracker_notification;
constexpr alert_category_t alert::debug_notification;
constexpr alert_category_t alert::connect_notification;
constexpr alert_category_t alert::status_notification;
#if TORRENT_ABI_VERSION == 1
constexpr alert_category_t alert::debug_notification;
constexpr alert_category_t alert::progress_notification;
#endif
constexpr alert_category_t alert::ip_block_notification;

View File

@ -44,7 +44,7 @@ lt::settings_pack settings()
| alert::port_mapping_notification
| alert::storage_notification
| alert::tracker_notification
| alert::debug_notification
| alert::connect_notification
| alert::status_notification
| alert::ip_block_notification
| alert::dht_notification

View File

@ -51,6 +51,7 @@ TORRENT_TEST(alerts_types)
TEST_EQUAL(torrent_alert::alert_type, 0);
TEST_EQUAL(peer_alert::alert_type, 1);
TEST_EQUAL(tracker_alert::alert_type, 2);
TEST_EQUAL(alert::debug_notification, alert::connect_notification);
#endif
#define TEST_ALERT_TYPE(name, seq, prio, cat) \
@ -92,8 +93,8 @@ TORRENT_TEST(alerts_types)
TEST_ALERT_TYPE(peer_unsnubbed_alert, 20, 0, alert::peer_notification);
TEST_ALERT_TYPE(peer_snubbed_alert, 21, 0, alert::peer_notification);
TEST_ALERT_TYPE(peer_error_alert, 22, 0, alert::peer_notification);
TEST_ALERT_TYPE(peer_connect_alert, 23, 0, alert::debug_notification);
TEST_ALERT_TYPE(peer_disconnected_alert, 24, 0, alert::debug_notification);
TEST_ALERT_TYPE(peer_connect_alert, 23, 0, alert::connect_notification);
TEST_ALERT_TYPE(peer_disconnected_alert, 24, 0, alert::connect_notification);
TEST_ALERT_TYPE(invalid_request_alert, 25, 0, alert::peer_notification);
TEST_ALERT_TYPE(torrent_finished_alert, 26, 1, alert::status_notification);
TEST_ALERT_TYPE(piece_finished_alert, 27, 0, PROGRESS_NOTIFICATION alert::piece_progress_notification);