deluge_core update for proxy

This commit is contained in:
Marcos Pinto 2007-06-21 23:12:36 +00:00
parent 0b34410f37
commit 67c09ebf56
1 changed files with 19 additions and 2 deletions

View File

@ -1311,15 +1311,32 @@ static PyObject *torrent_proxy_settings(PyObject *self, PyObject *args)
char *server, *login, *pasw; char *server, *login, *pasw;
int portnum; int portnum;
libtorrent::proxy_settings::proxy_type proxytype; libtorrent::proxy_settings::proxy_type proxytype;
bool peerproxy, webseedproxy, trackerproxy, dhtproxy;
PyArg_ParseTuple(args, "sssii", &server, &login, &pasw, &portnum, &proxytype); PyArg_ParseTuple(args, "sssii", &server, &login, &pasw, &portnum, &proxytype, &peerproxy, &webseedproxy, &trackerproxy, &dhtproxy);
M_proxy_settings->type = proxytype; M_proxy_settings->type = proxytype;
M_proxy_settings->username = login; M_proxy_settings->username = login;
M_proxy_settings->password = pasw; M_proxy_settings->password = pasw;
M_proxy_settings->hostname = server; M_proxy_settings->hostname = server;
M_proxy_settings->port = portnum; M_proxy_settings->port = portnum;
if (peerproxy){
M_ses->set_peer_proxy(*M_proxy_settings)
}
if (webseedproxy){
M_ses->set_web_seed_proxy(*M_proxy_settings)
}
if (trackerproxy){
M_ses->set_tracker_proxy(*M_proxy_settings)
}
if (dhtproxy){
M_ses->set_dht_proxy(*M_proxy_settings)
}
Py_INCREF(Py_None); return Py_None; Py_INCREF(Py_None); return Py_None;
} }