document the problem of the disk cache potentially modifying files after saving resume data. In trunk, add a flag to flush the cache in the same call as saving resume data

This commit is contained in:
Arvid Norberg
2010-10-29 02:21:43 +00:00
parent 7189fc6332
commit 0d196d3c84
5 changed files with 27 additions and 6 deletions

View File

@@ -334,7 +334,7 @@ void bind_torrent_handle()
.def("prioritize_files", &prioritize_files)
.def("file_priorities", &file_priorities)
.def("use_interface", &torrent_handle::use_interface)
.def("save_resume_data", _(&torrent_handle::save_resume_data))
.def("save_resume_data", _(&torrent_handle::save_resume_data), arg("flags" = 0))
.def("need_save_resume_data", _(&torrent_handle::need_save_resume_data))
.def("force_reannounce", _(force_reannounce0))
.def("force_reannounce", &force_reannounce)
@@ -366,6 +366,10 @@ void bind_torrent_handle()
#endif
;
enum_<torrent_handle::save_resume_flags_t>("save_resume_flags_t")
.value("flush_disk_cache", torrent_handle::flush_disk_cache)
;
enum_<torrent_handle::deadline_flags>("deadline_flags")
.value("alert_when_available", torrent_handle::alert_when_available)
;