Standalone: independently destroy the connection and request pools

Add independent modsecFinishConnection API that allows you to independently
destroy the connection and request pools. This is to facilitate reuse of a
connection for multiple requests.
This commit is contained in:
David Andrews
2014-03-03 14:17:00 -08:00
committed by Felipe Zimmerle
parent 27dd513ab6
commit dda91f1689
4 changed files with 19 additions and 1 deletions

View File

@@ -654,11 +654,20 @@ int modsecFinishRequest(request_rec *r) {
// make sure you cleanup before calling apr_terminate()
// otherwise double-free might occur, because of the request body pool cleanup function
//
apr_pool_destroy(r->connection->pool);
apr_pool_destroy(r->pool);
return DECLINED;
}
// destroy only the connection pool
int modsecFinishConnection(conn_rec *c)
{
apr_pool_destroy(c->pool);
}
void modsecSetLogHook(void *obj, void (*hook)(void *obj, int level, char *str)) {
modsecLogObj = obj;
modsecLogHook = hook;