* Starting work on merging get/set variable. Moved the bool and value

variables, still might have missed some prior uses that might cause
exceptions to be thrown.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@890 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-04-14 12:43:19 +00:00
parent 4a449bae67
commit 7c121ac049
14 changed files with 470 additions and 115 deletions
+3 -3
View File
@@ -108,7 +108,7 @@ receive_tracker_dump(const std::string& url, const char* data, size_t size) {
void
Manager::handshake_log(const sockaddr* sa, int msg, int err, const torrent::HashString* hash) {
if (!control->variable()->get_value("handshake_log"))
if (!control->variable()->get_value("get_handshake_log"))
return;
std::string peer;
@@ -276,13 +276,13 @@ Manager::shutdown(bool force) {
void
Manager::listen_open() {
if (!control->variable()->get_value("port_open"))
if (!control->variable()->get_value("get_port_open"))
return;
if (m_portFirst > m_portLast)
throw torrent::input_error("Invalid port range for listening");
if (control->variable()->get_value("port_random")) {
if (control->variable()->get_value("get_port_random")) {
int boundary = m_portFirst + random() % (m_portLast - m_portFirst + 1);
if (torrent::connection_manager()->listen_open(boundary, m_portLast) ||