This commit is contained in:
Marcos Pinto 2007-06-07 20:05:33 +00:00
parent 5a04b7aeed
commit 07d15709a6
1 changed files with 12 additions and 8 deletions

View File

@ -1223,14 +1223,18 @@ static PyObject *torrent_pe_settings(PyObject *self, PyObject *args)
{ {
pe_settings s = pe_settings(); pe_settings s = pe_settings();
M_pe_settings = new pe_settings(); M_pe_settings = new pe_settings();
M_pe_settings->out_enc_policy = s.out_enc_policy; libtorrent::pe_settings::enc_policy out, in, prefer;
printf("out policy is %d\r\n", s.out_enc_policy); libtorrent::pe_settings::enc_level level;
M_pe_settings->in_enc_policy = s.in_enc_policy;
printf("in policy is %d\r\n", s.in_enc_policy) ; PyArg_ParseTuple(args, "iiii", &out, &in, &level, &prefer);
M_pe_settings->allowed_enc_level = s.allowed_enc_level; M_pe_settings->out_enc_policy = out;
printf("level is %d\r\n", s.allowed_enc_level); printf("out policy is %d\r\n", M_pe_settings->out_enc_policy);
M_pe_settings->prefer_rc4 = int(s.prefer_rc4); M_pe_settings->in_enc_policy = in;
printf("prefer rc4 is %d\r\n", s.prefer_rc4); printf("in policy is %d\r\n", M_pe_settings->in_enc_policy) ;
M_pe_settings->allowed_enc_level = level;
printf("level is %d\r\n", M_pe_settings->allowed_enc_level);
M_pe_settings->prefer_rc4 = prefer;
printf("prefer rc4 is %d\r\n", M_pe_settings->prefer_rc4);
M_ses->set_pe_settings(*M_pe_settings); M_ses->set_pe_settings(*M_pe_settings);
return Py_None; return Py_None;
} }