mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Remove the optional integer argument to SSL_write; now it will always send
the entire string passed to it
This commit is contained in:
parent
3c044942ab
commit
b38175ef3d
1 changed files with 2 additions and 5 deletions
|
@ -2216,14 +2216,11 @@ staticforward PyTypeObject SSL_Type = {
|
||||||
static PyObject *SSL_SSLwrite(SSLObject *self, PyObject *args)
|
static PyObject *SSL_SSLwrite(SSLObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
char *data;
|
char *data;
|
||||||
size_t len = 0;
|
size_t len;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "s#|i:write", &data, &len))
|
if (!PyArg_ParseTuple(args, "s#:write", &data, &len))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!len)
|
|
||||||
len = strlen(data);
|
|
||||||
|
|
||||||
len = SSL_write(self->ssl, data, len);
|
len = SSL_write(self->ssl, data, len);
|
||||||
return PyInt_FromLong((long)len);
|
return PyInt_FromLong((long)len);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue