Added resource for max open files.

Fixed bug that could cause infinit looping on SIGBUS.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@460 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-06-10 21:37:06 +00:00
parent 693ce38317
commit fdc56e8f09
7 changed files with 24 additions and 9 deletions
+10
View File
@@ -63,6 +63,11 @@ validate_read_ahead(int arg) {
return arg >= 1 && arg < 64;
}
bool
validate_fd(int arg) {
return arg >= 10 && arg < 1024;
}
void
apply_download_min_peers(core::Download* d, int arg) {
d->get_download().set_peers_min(arg);
@@ -100,6 +105,11 @@ apply_hash_read_ahead(ui::Control* m, int arg) {
torrent::set_hash_read_ahead(arg << 20);
}
void
apply_max_open_files(ui::Control* m, int arg) {
torrent::set_max_open_files(arg);
}
void
apply_bind(ui::Control* m, const std::string& arg) {
torrent::set_bind(arg);