* Added TextElementBranch that uses a slot as the conditional.

* Added timeout to WindowText and updated download and peer info.

* Moved default http agent string to rtorrent/configure.ac.

* Periodic syncing of chunks now tries to only sync tightly packed
  ranges of chunks unless timeout_sync has been reached.

* ChunkManager now checks if max memory is set to RLIM_INFINITY, if so
  use 2^32.

* Added safe_sync option that forces MS_SYNC to be used before
  unmapping chunks.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@757 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-08-13 23:02:13 +00:00
parent 34258bcfb2
commit 4d988fccb9
15 changed files with 172 additions and 23 deletions
+5 -7
View File
@@ -78,9 +78,9 @@ public:
const std::string& str() const { return m_string; }
void set_str(const std::string& s) { m_string = s; }
private:
virtual extent_type max_length() { return m_string.size(); }
private:
virtual char* copy_string(char* first, char* last, void* object);
std::string m_string;
@@ -93,9 +93,9 @@ public:
m_attributes = attributes;
}
private:
virtual extent_type max_length() { return m_length; }
private:
virtual char* copy_string(char* first, char* last, void* object);
extent_type m_length;
@@ -113,16 +113,14 @@ public:
m_attributes = attributes;
}
private:
virtual extent_type max_length() { return m_length; }
private:
virtual char* copy_string(char* first, char* last, void* object) {
arg1_type arg1 = reinterpret_cast<arg1_type>(object);
if (arg1 == NULL)
if (object == NULL)
return first;
result_type result = m_slot(arg1);
result_type result = m_slot(reinterpret_cast<arg1_type>(object));
extent_type length = std::min<extent_type>(result_length(&result), last - first);
std::memcpy(first, result_buffer(&result), length);