enc fix
This commit is contained in:
parent
5a04b7aeed
commit
07d15709a6
|
@ -1223,14 +1223,18 @@ static PyObject *torrent_pe_settings(PyObject *self, PyObject *args)
|
|||
{
|
||||
pe_settings s = pe_settings();
|
||||
M_pe_settings = new pe_settings();
|
||||
M_pe_settings->out_enc_policy = s.out_enc_policy;
|
||||
printf("out policy is %d\r\n", s.out_enc_policy);
|
||||
M_pe_settings->in_enc_policy = s.in_enc_policy;
|
||||
printf("in policy is %d\r\n", s.in_enc_policy) ;
|
||||
M_pe_settings->allowed_enc_level = s.allowed_enc_level;
|
||||
printf("level is %d\r\n", s.allowed_enc_level);
|
||||
M_pe_settings->prefer_rc4 = int(s.prefer_rc4);
|
||||
printf("prefer rc4 is %d\r\n", s.prefer_rc4);
|
||||
libtorrent::pe_settings::enc_policy out, in, prefer;
|
||||
libtorrent::pe_settings::enc_level level;
|
||||
|
||||
PyArg_ParseTuple(args, "iiii", &out, &in, &level, &prefer);
|
||||
M_pe_settings->out_enc_policy = out;
|
||||
printf("out policy is %d\r\n", M_pe_settings->out_enc_policy);
|
||||
M_pe_settings->in_enc_policy = in;
|
||||
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);
|
||||
return Py_None;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue