ut_metadata fix to not send metadata for private torrents

This commit is contained in:
Arvid Norberg 2008-11-25 19:25:49 +00:00
parent 153cad1315
commit 93a0103746
1 changed files with 2 additions and 0 deletions

View File

@ -428,6 +428,8 @@ namespace libtorrent
boost::shared_ptr<torrent_plugin> create_ut_metadata_plugin(torrent* t, void*) boost::shared_ptr<torrent_plugin> create_ut_metadata_plugin(torrent* t, void*)
{ {
// don't add this extension if the torrent is private
if (t->valid_metadata() && t->torrent_file().priv()) return boost::shared_ptr<torrent_plugin>();
return boost::shared_ptr<torrent_plugin>(new ut_metadata_plugin(*t)); return boost::shared_ptr<torrent_plugin>(new ut_metadata_plugin(*t));
} }