You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.1 KiB
36 lines
1.1 KiB
Index: pyOpenSSL-0.10/src/ssl/connection.c
|
|
===================================================================
|
|
--- pyOpenSSL-0.10.orig/src/ssl/connection.c
|
|
+++ pyOpenSSL-0.10/src/ssl/connection.c
|
|
@@ -369,17 +369,20 @@ has been sent.\n\
|
|
@param buf: The string to send\n\
|
|
@param flags: (optional) Included for compatability with the socket\n\
|
|
API, the value is ignored\n\
|
|
-@return: The number of bytes written\n\
|
|
+@return: None\n\
|
|
";
|
|
static PyObject *
|
|
ssl_Connection_sendall(ssl_ConnectionObj *self, PyObject *args)
|
|
{
|
|
+ Py_buffer pbuf;
|
|
char *buf;
|
|
int len, ret, err, flags;
|
|
PyObject *pyret = Py_None;
|
|
|
|
- if (!PyArg_ParseTuple(args, "s#|i:sendall", &buf, &len, &flags))
|
|
+ if (!PyArg_ParseTuple(args, "s*|i:sendall", &pbuf, &flags))
|
|
return NULL;
|
|
+ buf = pbuf.buf;
|
|
+ len = pbuf.len;
|
|
|
|
do {
|
|
MY_BEGIN_ALLOW_THREADS(self->tstate)
|
|
@@ -405,6 +408,7 @@ ssl_Connection_sendall(ssl_ConnectionObj
|
|
break;
|
|
}
|
|
} while (len > 0);
|
|
+ PyBuffer_Release(&pbuf);
|
|
|
|
Py_XINCREF(pyret);
|
|
return pyret;
|