From e8d75cffe3f317f8d40966fc6fe83eb6e801eb82 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 25 Jan 2009 02:10:39 +0000 Subject: lt sync 3209 --- libtorrent/src/file_pool.cpp | 3 ++- libtorrent/src/session_impl.cpp | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) 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(); } -- cgit