mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 21:52:30 +00:00
* Don't show ETA on finished and stopped torrents.
* Added percentage completed to active unfinished torrents. * Re-enabled different seeding and leeching priorities. * Make a temporary container in AvailableList::insert(AddressList*) when doing std::set_differernce. AvailableList's std::vector would resize and cause invalidated iterators to be used. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@630 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
+11
-2
@@ -34,6 +34,12 @@
|
||||
// Skomakerveien 33
|
||||
// 3185 Skoppum, NORWAY
|
||||
|
||||
// A simple, and not guaranteed atomic, lockfile implementation. It
|
||||
// saves the hostname and pid in the lock file, which may be accessed
|
||||
// by Lockfile::locked_by(). If the path is an empty string then no
|
||||
// lockfile will be created when Lockfile::try_lock() is called, still
|
||||
// it will set the locked state of the Lockfile instance.
|
||||
|
||||
#ifndef RTORRENT_UTILS_LOCKFILE_H
|
||||
#define RTORRENT_UTILS_LOCKFILE_H
|
||||
|
||||
@@ -43,8 +49,9 @@ namespace utils {
|
||||
|
||||
class Lockfile {
|
||||
public:
|
||||
Lockfile() : m_locked(false) {}
|
||||
|
||||
bool is_locked() const { return !m_id.empty(); }
|
||||
bool is_locked() const { return m_locked; }
|
||||
|
||||
// If the path is empty no lock file will be created, although
|
||||
// is_locked() will return true.
|
||||
@@ -54,9 +61,11 @@ public:
|
||||
const std::string& path() const { return m_path; }
|
||||
void set_path(const std::string& path) { m_path = path; }
|
||||
|
||||
std::string locked_by() const;
|
||||
|
||||
private:
|
||||
std::string m_path;
|
||||
std::string m_id;
|
||||
bool m_locked;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user