[pywin32-checkins] pywin32/isapi/src ControlBlock.h,1.1,1.2 PyExtensionObjects.cpp,1.1,1.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2004-10-07 04:33:08
|
Update of /cvsroot/pywin32/pywin32/isapi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7909 Modified Files: ControlBlock.h PyExtensionObjects.cpp Log Message: Correct WriteClient return value handling. Index: ControlBlock.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/src/ControlBlock.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ControlBlock.h 6 Oct 2004 05:11:53 -0000 1.1 --- ControlBlock.h 7 Oct 2004 04:32:49 -0000 1.2 *************** *** 76,79 **** --- 76,83 ---- return dwBufLen; } + BOOL WriteClient(LPCTSTR buffer, DWORD *buffLen, const int reserved = 0) + { + return m_pECB->WriteClient(m_pECB->ConnID, (void *) buffer, buffLen, reserved); + } bool ReadClient(LPVOID lpvBuffer, LPDWORD lpdwSize) Index: PyExtensionObjects.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/isapi/src/PyExtensionObjects.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PyExtensionObjects.cpp 6 Oct 2004 05:11:53 -0000 1.1 --- PyExtensionObjects.cpp 7 Oct 2004 04:32:49 -0000 1.2 *************** *** 295,304 **** ! // @pymethod |EXTENSION_CONTROL_BLOCK|WriteClient| PyObject * PyECB::WriteClient(PyObject *self, PyObject *args) { BOOL bRes = FALSE; TCHAR * buffer = NULL; ! int buffLen = 0; int reserved = 0; --- 295,304 ---- ! // @pymethod int|EXTENSION_CONTROL_BLOCK|WriteClient| PyObject * PyECB::WriteClient(PyObject *self, PyObject *args) { BOOL bRes = FALSE; TCHAR * buffer = NULL; ! DWORD buffLen = 0; int reserved = 0; *************** *** 309,322 **** return NULL; if (pecb->m_pcb){ Py_BEGIN_ALLOW_THREADS ! bRes = pecb->m_pcb->WriteStream(buffer, buffLen, reserved); Py_END_ALLOW_THREADS if (!bRes) return SetPyECBError("WriteClient"); } ! ! Py_INCREF(Py_None); ! return Py_None; } --- 309,322 ---- return NULL; + DWORD bytesWritten = 0; if (pecb->m_pcb){ Py_BEGIN_ALLOW_THREADS ! bRes = pecb->m_pcb->WriteClient(buffer, &buffLen, reserved); Py_END_ALLOW_THREADS if (!bRes) return SetPyECBError("WriteClient"); } ! return PyInt_FromLong(buffLen); ! // @rdesc the result is the number of bytes written. } |