improve add_torrent_params::flags documentation and fix related logging bug

This commit is contained in:
arvidn 2016-05-30 16:36:44 -07:00
parent b3bbb2f0f6
commit ec182492cc
2 changed files with 17 additions and 12 deletions

View File

@ -377,6 +377,11 @@ namespace libtorrent
// flags controlling aspects of this torrent and how it's added. See
// flags_t for details.
// .. note::
// The ``flags`` field is initialized with default flags by the
// constructor. In order to preserve default behavior when clearing or
// setting other flags, make sure to bitwise OR or in a flag or bitwise
// AND the inverse of a flag to clear it.
boost::uint64_t flags;
// set this to the info hash of the torrent to add in case the info-hash

View File

@ -728,29 +728,29 @@ namespace libtorrent
, p.max_connections
, p.upload_limit
, p.download_limit
, (p.flags == add_torrent_params::flag_seed_mode)
, (p.flags & add_torrent_params::flag_seed_mode)
? "seed-mode " : ""
, (p.flags == add_torrent_params::flag_override_resume_data)
, (p.flags & add_torrent_params::flag_override_resume_data)
? "override-resume-data " : ""
, (p.flags == add_torrent_params::flag_upload_mode)
, (p.flags & add_torrent_params::flag_upload_mode)
? "upload-mode " : ""
, (p.flags == add_torrent_params::flag_share_mode)
, (p.flags & add_torrent_params::flag_share_mode)
? "share-mode " : ""
, (p.flags == add_torrent_params::flag_apply_ip_filter)
, (p.flags & add_torrent_params::flag_apply_ip_filter)
? "apply-ip-filter " : ""
, (p.flags == add_torrent_params::flag_paused)
, (p.flags & add_torrent_params::flag_paused)
? "paused " : ""
, (p.flags == add_torrent_params::flag_auto_managed)
, (p.flags & add_torrent_params::flag_auto_managed)
? "auto-managed " : ""
, (p.flags == add_torrent_params::flag_merge_resume_trackers)
, (p.flags & add_torrent_params::flag_merge_resume_trackers)
? "merge-resume-trackers " : ""
, (p.flags == add_torrent_params::flag_update_subscribe)
, (p.flags & add_torrent_params::flag_update_subscribe)
? "update-subscribe " : ""
, (p.flags == add_torrent_params::flag_super_seeding)
, (p.flags & add_torrent_params::flag_super_seeding)
? "super-seeding " : ""
, (p.flags == add_torrent_params::flag_sequential_download)
, (p.flags & add_torrent_params::flag_sequential_download)
? "sequential-download " : ""
, (p.flags == add_torrent_params::flag_use_resume_save_path)
, (p.flags & add_torrent_params::flag_use_resume_save_path)
? "resume-save-path " : ""
, p.save_path.c_str()
);