* Fixed a buffer overflow when writting to the output buffer. This

would in some rare occasions cause memory to be corrupted. leading to
a crash.

* Added option for setting the http proxy and proccess's umask.

* Save the total uploaded for downloads between sessions.

* Moved from sigc++ to my own lightweight slot class for the task
scheduler. This saves some 5-600kb when compiled with debugging
symbols, 1-200kb without.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@605 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-12-05 07:59:29 +00:00
parent 32a3619cd8
commit ba7d61b532
15 changed files with 250 additions and 23 deletions
+18
View File
@@ -59,6 +59,8 @@ void apply_connection_seed(Control* m, const std::string& arg);
void apply_global_download_rate(Control* m, int arg);
void apply_global_upload_rate(Control* m, int arg);
void apply_umask(Control* m, int arg);
void apply_hash_read_ahead(Control* m, int arg);
void apply_hash_interval(Control* m, int arg);
void apply_hash_max_tries(Control* m, int arg);
@@ -73,6 +75,8 @@ void apply_tracker_dump(Control* m, const std::string& arg);
void apply_use_udp_trackers(Control* m, const std::string& arg);
void apply_check_hash(Control* m, const std::string& arg);
void apply_http_proxy(Control* m, const std::string& arg);
void apply_session_directory(Control* m, const std::string& arg);
void apply_encoding_list(Control* m, const std::string& arg);
@@ -90,6 +94,20 @@ private:
Apply m_apply;
};
class OptionHandlerOctal : public OptionHandlerBase {
public:
typedef void (*Apply)(Control*, int);
OptionHandlerOctal(Control* c, Apply a) :
m_control(c), m_apply(a) {}
virtual void process(const std::string& key, const std::string& arg);
private:
Control* m_control;
Apply m_apply;
};
class OptionHandlerString : public OptionHandlerBase {
public:
typedef void (*Apply)(Control*, const std::string&);