From 5697376caafc36cb134d8f09c60dd784b3600b9c Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 25 Jan 2009 02:10:39 +0000 Subject: [PATCH] lt sync 3209 --- libtorrent/bindings/python/src/converters.cpp | 2 +- libtorrent/src/file_pool.cpp | 3 ++- libtorrent/src/session_impl.cpp | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libtorrent/bindings/python/src/converters.cpp b/libtorrent/bindings/python/src/converters.cpp index cae84be75..7f207f2e8 100755 --- a/libtorrent/bindings/python/src/converters.cpp +++ b/libtorrent/bindings/python/src/converters.cpp @@ -9,7 +9,7 @@ using namespace boost::python; template struct pair_to_tuple { - static PyObject* convert(const std::pair& p) + static PyObject* convert(const std::pair& p) { return incref(make_tuple(p.first, p.second).ptr()); } diff --git a/libtorrent/src/file_pool.cpp b/libtorrent/src/file_pool.cpp index 865c071ff..ef7ccca0d 100644 --- a/libtorrent/src/file_pool.cpp +++ b/libtorrent/src/file_pool.cpp @@ -57,7 +57,8 @@ namespace libtorrent lru_file_entry e = *i; e.last_use = time_now(); - if (e.key != st) + if (e.key != st && ((e.mode & file::rw_mask) != file::read_only + || (m & file::rw_mask) != file::read_only)) { // this means that another instance of the storage // is using the exact same file. diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 5596b7fef..4ccf35066 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -2163,7 +2163,6 @@ namespace aux { mutex_t::scoped_lock l(m_mutex); if (m_dht) e = m_dht->state(); done = true; - l.unlock(); c.notify_all(); }