Changeset 962
- Timestamp:
- 08/22/07 03:16:29 (6 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
libtorrent/rak/socket_address.h (modified) (1 diff)
-
libtorrent/src/net/socket_fd.cc (modified) (1 diff)
-
rtorrent/rak/socket_address.h (modified) (1 diff)
-
rtorrent/src/command_download.cc (modified) (3 diffs)
-
rtorrent/src/utils/socket_fd.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtorrent/rak/socket_address.h
r939 r962 64 64 public: 65 65 static const sa_family_t af_inet = AF_INET; 66 static const int pf_inet = PF_INET; 66 67 static const sa_family_t af_inet6 = AF_INET6; 68 static const int pf_inet6 = PF_INET6; 67 69 static const sa_family_t af_unspec = AF_UNSPEC; 70 static const int pf_unspec = PF_UNSPEC; 68 71 69 72 #ifdef AF_LOCAL 70 73 static const sa_family_t af_local = AF_LOCAL; 74 static const int pf_local = PF_LOCAL; 71 75 #else 72 76 static const sa_family_t af_local = AF_UNIX; 77 static const itn pf_local = PF_UNIX; 73 78 #endif 74 79 -
trunk/libtorrent/src/net/socket_fd.cc
r959 r962 113 113 bool 114 114 SocketFd::open_stream() { 115 return (m_fd = socket( PF_INET, SOCK_STREAM, IPPROTO_TCP)) != -1;115 return (m_fd = socket(rak::socket_address::pf_inet, SOCK_STREAM, IPPROTO_TCP)) != -1; 116 116 } 117 117 118 118 bool 119 119 SocketFd::open_datagram() { 120 return (m_fd = socket( PF_INET, SOCK_DGRAM, 0)) != -1;120 return (m_fd = socket(rak::socket_address::pf_inet, SOCK_DGRAM, 0)) != -1; 121 121 } 122 122 123 123 bool 124 124 SocketFd::open_local() { 125 return (m_fd = socket( PF_LOCAL, SOCK_STREAM, 0)) != -1;125 return (m_fd = socket(rak::socket_address::pf_local, SOCK_STREAM, 0)) != -1; 126 126 } 127 127 -
trunk/rtorrent/rak/socket_address.h
r938 r962 64 64 public: 65 65 static const sa_family_t af_inet = AF_INET; 66 static const int pf_inet = PF_INET; 66 67 static const sa_family_t af_inet6 = AF_INET6; 68 static const int pf_inet6 = PF_INET6; 67 69 static const sa_family_t af_unspec = AF_UNSPEC; 70 static const int pf_unspec = PF_UNSPEC; 68 71 69 72 #ifdef AF_LOCAL 70 73 static const sa_family_t af_local = AF_LOCAL; 74 static const int pf_local = PF_LOCAL; 71 75 #else 72 76 static const sa_family_t af_local = AF_UNIX; 77 static const itn pf_local = PF_UNIX; 73 78 #endif 74 79 -
trunk/rtorrent/src/command_download.cc
r961 r962 295 295 ADD_CD_SLOT_PUBLIC("d." key, call_unknown, rpc::object_void_d_fn(slot), "i:", "") 296 296 297 #define ADD_CD_LIST_OBSOLETE(key, slot) \ 298 ADD_CD_SLOT_PUBLIC(key, call_list, slot, "i:", "") 299 297 300 #define ADD_CD_LIST(key, slot) \ 298 ADD_CD_SLOT_PUBLIC( key, call_list, slot, "i:", "")301 ADD_CD_SLOT_PUBLIC("d." key, call_list, slot, "i:", "") 299 302 300 303 #define ADD_CD_VARIABLE_VALUE(key, firstKey, secondKey) \ … … 347 350 ADD_CD_STRING_UNI("name", rak::on(std::mem_fun(&core::Download::download), std::mem_fun(&torrent::Download::name))); 348 351 352 ADD_CD_LIST_OBSOLETE("create_link", rak::bind_ptr_fn(&apply_d_change_link, 0)); 353 ADD_CD_LIST_OBSOLETE("delete_link", rak::bind_ptr_fn(&apply_d_change_link, 1)); 354 349 355 ADD_CD_LIST("create_link", rak::bind_ptr_fn(&apply_d_change_link, 0)); 350 356 ADD_CD_LIST("delete_link", rak::bind_ptr_fn(&apply_d_change_link, 1)); … … 391 397 392 398 ADD_CD_STRING_BI("connection_current", std::ptr_fun(&apply_d_connection_type), std::ptr_fun(&retrieve_d_connection_type)); 399 400 // This command really needs to be improved, so we have proper 401 // logging support. 402 ADD_CD_STRING_BI("message", std::mem_fun(&core::Download::set_message), std::mem_fun(&core::Download::message)); 393 403 394 404 add_copy_to_download("get_connection_leech", "d.get_connection_leech"); -
trunk/rtorrent/src/utils/socket_fd.cc
r959 r962 131 131 bool 132 132 SocketFd::open_stream() { 133 return (m_fd = socket( PF_INET, SOCK_STREAM, IPPROTO_TCP)) != -1;133 return (m_fd = socket(rak::socket_address::pf_inet, SOCK_STREAM, IPPROTO_TCP)) != -1; 134 134 } 135 135 136 136 bool 137 137 SocketFd::open_datagram() { 138 return (m_fd = socket( PF_INET, SOCK_DGRAM, 0)) != -1;138 return (m_fd = socket(rak::socket_address::pf_inet, SOCK_DGRAM, 0)) != -1; 139 139 } 140 140 141 141 bool 142 142 SocketFd::open_local() { 143 return (m_fd = socket( PF_LOCAL, SOCK_STREAM, 0)) != -1;143 return (m_fd = socket(rak::socket_address::pf_local, SOCK_STREAM, 0)) != -1; 144 144 } 145 145
Note: See TracChangeset
for help on using the changeset viewer.
