From 2c1f24c036333d4e8d4b736ee4449fe61e0fb895 Mon Sep 17 00:00:00 2001 From: Steven Siloti Date: Thu, 23 Jul 2015 20:13:32 -0700 Subject: [PATCH] switch to session_handle in plugin api --- include/libtorrent/extensions.hpp | 5 ++--- src/session_impl.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/libtorrent/extensions.hpp b/include/libtorrent/extensions.hpp index 4ae1c64ab..b64774373 100644 --- a/include/libtorrent/extensions.hpp +++ b/include/libtorrent/extensions.hpp @@ -176,13 +176,12 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/socket.hpp" #include "libtorrent/sha1_hash.hpp" // for sha1_hash #include "libtorrent/error_code.hpp" +#include "libtorrent/session_handle.hpp" #include "libtorrent/torrent_handle.hpp" #include "libtorrent/peer_connection_handle.hpp" namespace libtorrent { - namespace aux { struct session_impl; } - struct peer_plugin; struct peer_request; class entry; @@ -214,7 +213,7 @@ namespace libtorrent { return boost::shared_ptr(); } // called when plugin is added to a session - virtual void added(aux::session_impl*) {} + virtual void added(session_handle) {} // called when an alert is posted alerts that are filtered are not posted virtual void on_alert(alert const*) {} diff --git a/src/session_impl.cpp b/src/session_impl.cpp index e69960c91..cb188a441 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -895,7 +895,7 @@ namespace aux { m_ses_extensions.push_back(ext); m_alerts.add_extension(ext); - ext->added(this); + ext->added(session_handle(this)); } #endif // TORRENT_DISABLE_EXTENSIONS