@@ -196,7 +196,7 @@ char *get_env_var(request_rec *r, char *name) {
196196/**
197197 * Retrieve waf log field.
198198 */
199- void get_field_value (const char * from ,const char * to ,const char * text ,char * output ) {
199+ static void get_field_value (const char * from ,const char * to ,const char * text ,char * output ) {
200200char * first = strstr (text ,from );
201201int first_index = first - text ;
202202
@@ -230,7 +230,7 @@ void get_field_value(const char* from, const char* to, const char* text, char* o
230230/**
231231 * get ip and port number.
232232 */
233- void get_ip_port (const char * ip_port ,char * waf_ip ,char * waf_port ) {
233+ static void get_ip_port (const char * ip_port ,char * waf_ip ,char * waf_port ) {
234234char * comma = strstr (ip_port ,":" );
235235if (comma != NULL ) {
236236strcpy (waf_port ,comma + 1 );
@@ -244,7 +244,7 @@ void get_ip_port(const char* ip_port, char* waf_ip, char* waf_port) {
244244/**
245245 * get detail_messages.
246246 */
247- void get_detail_message (const char * str1 ,char * waf_detail_message ) {
247+ static void get_detail_message (const char * str1 ,char * waf_detail_message ) {
248248char * end = strstr (str1 ,"[file " );
249249if (end != NULL ) {
250250strncpy (waf_detail_message ,str1 ,end - str1 );
@@ -254,7 +254,7 @@ void get_detail_message(const char* str1, char* waf_detail_message) {
254254/**
255255 * only expose short path.
256256 */
257- void get_short_filename (char * waf_filename ) {
257+ static void get_short_filename (char * waf_filename ) {
258258char tmp_filename [1024 ]= "" ;
259259char * index = strstr (waf_filename ,WAF_RULESET_PREFIX );
260260
@@ -271,7 +271,7 @@ void get_short_filename(char* waf_filename) {
271271/**
272272 * get crs type and version.
273273 */
274- void get_ruleset_type_version (char * waf_ruleset_info ,char * waf_ruleset_type ,char * waf_ruleset_version ) {
274+ static void get_ruleset_type_version (char * waf_ruleset_info ,char * waf_ruleset_type ,char * waf_ruleset_version ) {
275275char ruleset_info_no_quote [200 ]= "" ;
276276char * type_start = NULL ;
277277char * type_end = NULL ;
@@ -289,7 +289,7 @@ void get_ruleset_type_version(char* waf_ruleset_info, char* waf_ruleset_type, ch
289289 }
290290}
291291
292- int write_file_with_lock (apr_global_mutex_t * lock ,apr_file_t * fd ,char * str ) {
292+ static int write_file_with_lock (apr_global_mutex_t * lock ,apr_file_t * fd ,char * str ) {
293293int rc ;
294294apr_size_t nbytes ,nbytes_written ;
295295
@@ -311,7 +311,7 @@ int write_file_with_lock(apr_global_mutex_t* lock, apr_file_t* fd, char* str) {
311311return WAF_LOG_UTIL_SUCCESS ;
312312}
313313
314- char * waf_current_logtime (apr_pool_t * mp ) {
314+ static char * waf_current_logtime (apr_pool_t * mp ) {
315315apr_time_exp_t t ;
316316char tstr [100 ];
317317apr_size_t len ;
@@ -325,7 +325,7 @@ char *waf_current_logtime(apr_pool_t *mp) {
325325/**
326326 * send all waf fields in json format to a file.
327327 */
328- void send_waf_log (apr_global_mutex_t * lock ,apr_file_t * fd ,const char * str1 ,const char * ip_port ,const char * uri ,const char * time ,int mode ,const char * hostname ,request_rec * r ) {
328+ static void send_waf_log (apr_global_mutex_t * lock ,apr_file_t * fd ,const char * str1 ,const char * ip_port ,const char * uri ,const char * time ,int mode ,const char * hostname ,request_rec * r ) {
329329int rc = 0 ;
330330char * json_str ;
331331char waf_filename [1024 ]= "" ;