40
40
41
41
#include "api.h"
42
42
43
+ #ifdef WIN32
44
+ #include "msc_status_engine.h"
45
+ #endif
46
+
43
47
extern void * modsecLogObj ;
44
48
extern void (* modsecLogHook )(void * obj , int level , char * str );
45
49
extern int (* modsecDropAction )(request_rec * r );
@@ -75,6 +79,7 @@ DECLARE_HOOK(void,insert_filter,(request_rec *r))
75
79
DECLARE_HOOK (void ,insert_error_filter ,(request_rec * r ))
76
80
77
81
char * sa_name = "standalone" ;
82
+ const char * sa_name_argv [] = { "standalone" , NULL };
78
83
server_rec * server ;
79
84
apr_pool_t * pool = NULL ;
80
85
@@ -135,7 +140,7 @@ server_rec *modsecInit() {
135
140
server -> port = 80 ;
136
141
server -> process = apr_palloc (pool , sizeof (process_rec ));
137
142
server -> process -> argc = 1 ;
138
- server -> process -> argv = & sa_name ;
143
+ server -> process -> argv = sa_name_argv ;
139
144
server -> process -> pconf = pool ;
140
145
server -> process -> pool = pool ;
141
146
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,
223
228
}
224
229
225
230
apr_status_t ap_http_out_filter (ap_filter_t * f , apr_bucket_brigade * b ) {
226
- apr_status_t rc ;
227
231
apr_bucket_brigade * bb_out = (apr_bucket_brigade * )f -> ctx ;
228
232
229
233
APR_BRIGADE_CONCAT (bb_out , b );
@@ -662,9 +666,9 @@ int modsecFinishRequest(request_rec *r) {
662
666
// destroy only the connection pool
663
667
int modsecFinishConnection (conn_rec * c )
664
668
{
665
-
666
669
apr_pool_destroy (c -> pool );
667
670
671
+ return 0 ;
668
672
}
669
673
670
674
@@ -713,4 +717,4 @@ void modsecStatusEngineCall()
713
717
"SecStatusEngine to On.\n" );
714
718
}
715
719
}
716
- #endif
720
+ #endif
0 commit comments