@pymethod |EXTENSION_CONTROL_BLOCK|DoneWithSession|Calls ServerSupportFunction with HSE_REQ_DONE_WITH_SESSION
| 990 | |
| 991 | // @pymethod |EXTENSION_CONTROL_BLOCK|DoneWithSession|Calls ServerSupportFunction with HSE_REQ_DONE_WITH_SESSION |
| 992 | PyObject * PyECB::DoneWithSession(PyObject *self, PyObject * args) |
| 993 | { |
| 994 | DWORD status = HSE_STATUS_SUCCESS; |
| 995 | PyECB * pecb = (PyECB *) self; |
| 996 | if (!pecb || !pecb->Check()) return NULL; |
| 997 | |
| 998 | // @pyparm int|status|HSE_STATUS_SUCCESS|An optional status. |
| 999 | // HSE_STATUS_SUCCESS_AND_KEEP_CONN is supported by IIS to keep the connection alive. |
| 1000 | if (!PyArg_ParseTuple(args, "|i:DoneWithSession", &status)) |
| 1001 | return NULL; |
| 1002 | |
| 1003 | // Free any resources we've allocated on behalf of this ECB - this |
| 1004 | // currently means just the io-completion callback. |
| 1005 | CleanupIOCallback(pecb->m_pcb->GetECB()); |
| 1006 | |
| 1007 | Py_BEGIN_ALLOW_THREADS |
| 1008 | pecb->m_pcb->DoneWithSession(status); |
| 1009 | Py_END_ALLOW_THREADS |
| 1010 | pecb->m_pcb->Done(); |
| 1011 | pecb->m_pcb = NULL; |
| 1012 | Py_INCREF(Py_None); |
| 1013 | return Py_None; |
| 1014 | } |
| 1015 | |
| 1016 | // Setup an exception |
| 1017 |