| Update of /cvsroot/pywin32/pywin32/pyisapi/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4565
Modified Files:
	ControlBlock.h PyExtensionObjects.cpp 
Log Message:
Make DoneWithSession take the same args as HSE_REQ_DONE_WITH_SESSION
Index: ControlBlock.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/pyisapi/src/ControlBlock.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ControlBlock.h	1 Sep 2004 03:07:12 -0000	1.1
--- ControlBlock.h	9 Sep 2004 06:09:03 -0000	1.2
***************
*** 82,91 ****
  	}
  
! 	void SignalAsyncRequestDone(const bool bKeepAlive=true)
  	{
  
  		// Let IIS know that this worker thread is done with this request.  This will allow
  		// IIS to recycle the EXTENSION_CONTROL_BLOCK.  
- 		DWORD dwState = (bKeepAlive) ? HSE_STATUS_SUCCESS_AND_KEEP_CONN : HSE_STATUS_SUCCESS;
  		m_pECB->ServerSupportFunction(m_pECB->ConnID, HSE_REQ_DONE_WITH_SESSION, &dwState, NULL, 0);
  	}
--- 82,90 ----
  	}
  
! 	void DoneWithSession(DWORD dwState)
  	{
  
  		// Let IIS know that this worker thread is done with this request.  This will allow
  		// IIS to recycle the EXTENSION_CONTROL_BLOCK.  
  		m_pECB->ServerSupportFunction(m_pECB->ConnID, HSE_REQ_DONE_WITH_SESSION, &dwState, NULL, 0);
  	}
Index: PyExtensionObjects.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/pyisapi/src/PyExtensionObjects.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** PyExtensionObjects.cpp	9 Sep 2004 00:22:28 -0000	1.3
--- PyExtensionObjects.cpp	9 Sep 2004 06:09:11 -0000	1.4
***************
*** 145,148 ****
--- 145,149 ----
  	{"ReadClient",				PyECB::ReadClient, 1},			 // @pymeth ReadClient|
  	{"SendResponseHeaders",	    PyECB::SendResponseHeaders, 1},  // @pymeth SendResponseHeaders|
+ 	
  	{"DoneWithSession",	        PyECB::DoneWithSession, 1},      // @pymeth DoneWithSession|
  	{"close",                   PyECB::DoneWithSession, 1},      // @pymeth close|A synonym for DoneWithSession.
***************
*** 499,517 ****
  PyObject * PyECB::DoneWithSession(PyObject *self, PyObject * args)
  {
! 	BOOL bRes = FALSE;
! 	int bKeepAlive = 0;
! 
  	PyECB * pecb = (PyECB *) self;
  
! 	if (!PyArg_ParseTuple(args, "|i:DoneWithSession", &bKeepAlive))
  		return NULL;
  
  	if (pecb->m_pcb){
  		Py_BEGIN_ALLOW_THREADS
! 		pecb->m_pcb->SignalAsyncRequestDone((bKeepAlive!=0)?true:false);
  		pecb->m_bAsyncDone = true;
  		Py_END_ALLOW_THREADS
  	}
- 
  	Py_INCREF(Py_None);
  	return Py_None;
--- 500,517 ----
  PyObject * PyECB::DoneWithSession(PyObject *self, PyObject * args)
  {
! 	DWORD status = HSE_STATUS_SUCCESS;
  	PyECB * pecb = (PyECB *) self;
  
! 	// @pyparm int|status|HSE_STATUS_SUCCESS|An optional status.
! 	// HSE_STATUS_SUCCESS_AND_KEEP_CONN is supported by IIS to keep the connection alive.
! 	if (!PyArg_ParseTuple(args, "|i:DoneWithSession", &status))
  		return NULL;
  
  	if (pecb->m_pcb){
  		Py_BEGIN_ALLOW_THREADS
! 		pecb->m_pcb->DoneWithSession(status);
  		pecb->m_bAsyncDone = true;
  		Py_END_ALLOW_THREADS
  	}
  	Py_INCREF(Py_None);
  	return Py_None;
 |