4040
4141#include "api.h"
4242
43+ #ifdef WIN32
44+ #include "msc_status_engine.h"
45+ #endif
46+
4347extern void * modsecLogObj ;
4448extern void (* modsecLogHook )(void * obj , int level , char * str );
4549extern int (* modsecDropAction )(request_rec * r );
@@ -75,6 +79,7 @@ DECLARE_HOOK(void,insert_filter,(request_rec *r))
7579DECLARE_HOOK (void ,insert_error_filter ,(request_rec * r ))
7680
7781char * sa_name = "standalone" ;
82+ const char * sa_name_argv [] = { "standalone" , NULL };
7883server_rec * server ;
7984apr_pool_t * pool = NULL ;
8085
@@ -135,7 +140,7 @@ server_rec *modsecInit() {
135140 server -> port = 80 ;
136141 server -> process = apr_palloc (pool , sizeof (process_rec ));
137142 server -> process -> argc = 1 ;
138- server -> process -> argv = & sa_name ;
143+ server -> process -> argv = sa_name_argv ;
139144 server -> process -> pconf = pool ;
140145 server -> process -> pool = pool ;
141146 server -> process -> short_name = sa_name ;
@@ -223,7 +228,6 @@ apr_status_t ap_http_in_filter(ap_filter_t *f, apr_bucket_brigade *bb_out,
223228}
224229
225230apr_status_t ap_http_out_filter (ap_filter_t * f , apr_bucket_brigade * b ) {
226- apr_status_t rc ;
227231 apr_bucket_brigade * bb_out = (apr_bucket_brigade * )f -> ctx ;
228232
229233 APR_BRIGADE_CONCAT (bb_out , b );
@@ -662,9 +666,9 @@ int modsecFinishRequest(request_rec *r) {
662666// destroy only the connection pool
663667int modsecFinishConnection (conn_rec * c )
664668{
665-
666669 apr_pool_destroy (c -> pool );
667670
671+ return 0 ;
668672}
669673
670674
@@ -713,4 +717,4 @@ void modsecStatusEngineCall()
713717 "SecStatusEngine to On.\n" );
714718 }
715719}
716- #endif
720+ #endif
0 commit comments