Show
Ignore:
Timestamp:
05/05/08 15:16:26 (4 years ago)
Author:
rakshasa
Message:

* Initial seeding support added. Patch by Josef Drexler.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/rtorrent/src/command_download.cc

    r1049 r1058  
    170170  else if (name == "seed") 
    171171    connType = torrent::Download::CONNECTION_SEED; 
     172  else if (name == "initial_seed") 
     173    connType = torrent::Download::CONNECTION_INITIAL_SEED; 
    172174  else 
    173175    throw torrent::input_error("Unknown peer connection type selected."); 
     
    193195  case torrent::Download::CONNECTION_SEED: 
    194196    return "seed"; 
     197  case torrent::Download::CONNECTION_INITIAL_SEED: 
     198    return "initial_seed"; 
    195199  default: 
    196200    return "unknown"; 
     
    493497 
    494498  ADD_CD_STRING_BI("connection_current", std::ptr_fun(&apply_d_connection_type), std::ptr_fun(&retrieve_d_connection_type)); 
     499  ADD_CD_VARIABLE_STRING("connection_leech",      "rtorrent", "connection_leech"); 
     500  ADD_CD_VARIABLE_STRING("connection_seed",       "rtorrent", "connection_seed"); 
    495501 
    496502  ADD_CD_VALUE_BI("hashing_failed",      std::mem_fun(&core::Download::set_hash_failed), std::mem_fun(&core::Download::is_hash_failed)); 
     
    499505  // logging support. 
    500506  ADD_CD_STRING_BI("message",            std::mem_fun(&core::Download::set_message), std::mem_fun(&core::Download::message)); 
    501  
    502   add_copy_to_download("get_connection_leech", "d.get_connection_leech"); 
    503   add_copy_to_download("set_connection_leech", "d.set_connection_leech"); 
    504   add_copy_to_download("get_connection_seed", "d.get_connection_seed"); 
    505   add_copy_to_download("set_connection_seed", "d.set_connection_seed"); 
    506507 
    507508  ADD_CD_VALUE_MEM_BI("max_file_size", &core::Download::file_list, &torrent::FileList::set_max_file_size, &torrent::FileList::max_file_size);