mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Patch #803998: Correctly check for error in SSL_write.
This commit is contained in:
parent
11892ecd6d
commit
405a7952fd
1 changed files with 3 additions and 2 deletions
|
@ -373,10 +373,11 @@ static PyObject *PySSL_SSLwrite(PySSLObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
char *data;
|
char *data;
|
||||||
int len;
|
int len;
|
||||||
|
int count;
|
||||||
int timedout;
|
int timedout;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "s#:write", &data, &len))
|
if (!PyArg_ParseTuple(args, "s#:write", &data, &count))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
timedout = wait_for_timeout(self->Socket, 1);
|
timedout = wait_for_timeout(self->Socket, 1);
|
||||||
|
@ -387,7 +388,7 @@ static PyObject *PySSL_SSLwrite(PySSLObject *self, PyObject *args)
|
||||||
do {
|
do {
|
||||||
err = 0;
|
err = 0;
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
len = SSL_write(self->ssl, data, len);
|
len = SSL_write(self->ssl, data, count);
|
||||||
err = SSL_get_error(self->ssl, len);
|
err = SSL_get_error(self->ssl, len);
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
if(PyErr_CheckSignals()) {
|
if(PyErr_CheckSignals()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue