* Converted VariableMap and ViewManager to using const char* as the

key, since they are never changed nor added from outside. This cut the
stripped binary size by 50KB.

* Use a shared have piece queue for each download. Each connection has
a time-stamp for the last have message they sent, which is checked
against the queue. This also avoids the race condition where some
peers would get incomplete views of our bitfield due to lost have
messages during handshake.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@839 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-01-01 14:57:10 +00:00
parent fe7adfc999
commit de744ad11d
8 changed files with 72 additions and 52 deletions
+2 -2
View File
@@ -409,13 +409,13 @@ apply_view_sort_new(Control* control, const std::string& arg) {
void
apply_import(const std::string& path) {
if (!control->variable()->process_file(path))
if (!control->variable()->process_file(path.c_str()))
throw torrent::input_error("Could not open option file: " + path);
}
void
apply_try_import(const std::string& path) {
if (!control->variable()->process_file(path))
if (!control->variable()->process_file(path.c_str()))
control->core()->push_log("Could not read resource file: " + path);
}