diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index d9900eed9..13572e847 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -191,7 +191,6 @@ namespace libtorrent , boost::noncopyable , initialize_timer , udp_socket_observer - , boost::enable_shared_from_this { #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING // this needs to be destructed last, since other components may log diff --git a/include/libtorrent/extensions.hpp b/include/libtorrent/extensions.hpp index 68fb88001..64c8c525a 100644 --- a/include/libtorrent/extensions.hpp +++ b/include/libtorrent/extensions.hpp @@ -217,7 +217,7 @@ namespace libtorrent { return boost::shared_ptr(); } // called when plugin is added to a session - virtual void added(boost::weak_ptr) {} + virtual void added(aux::session_impl*) {} // called when an alert is posted // alerts that are filtered are not diff --git a/src/session_impl.cpp b/src/session_impl.cpp index a5a6149fa..e2594623d 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -1549,7 +1549,7 @@ namespace aux { m_ses_extensions.push_back(ext); m_alerts.add_extension(ext); - ext->added(shared_from_this()); + ext->added(this); } #endif