Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit35bc225

Browse files
azhao155root
authored and
root
committed
change function to static function (microsoft#27)
1 parentd8271b0 commit35bc225

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

‎apache2/apache2_util.c‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ char *get_env_var(request_rec *r, char *name) {
196196
/**
197197
* Retrieve waf log field.
198198
*/
199-
voidget_field_value(constchar*from,constchar*to,constchar*text,char*output) {
199+
staticvoidget_field_value(constchar*from,constchar*to,constchar*text,char*output) {
200200
char*first=strstr(text,from);
201201
intfirst_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-
voidget_ip_port(constchar*ip_port,char*waf_ip,char*waf_port) {
233+
staticvoidget_ip_port(constchar*ip_port,char*waf_ip,char*waf_port) {
234234
char*comma=strstr(ip_port,":");
235235
if (comma!=NULL) {
236236
strcpy(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-
voidget_detail_message(constchar*str1,char*waf_detail_message) {
247+
staticvoidget_detail_message(constchar*str1,char*waf_detail_message) {
248248
char*end=strstr(str1,"[file ");
249249
if (end!=NULL) {
250250
strncpy(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-
voidget_short_filename(char*waf_filename) {
257+
staticvoidget_short_filename(char*waf_filename) {
258258
chartmp_filename[1024]="";
259259
char*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-
voidget_ruleset_type_version(char*waf_ruleset_info,char*waf_ruleset_type,char*waf_ruleset_version) {
274+
staticvoidget_ruleset_type_version(char*waf_ruleset_info,char*waf_ruleset_type,char*waf_ruleset_version) {
275275
charruleset_info_no_quote[200]="";
276276
char*type_start=NULL;
277277
char*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-
intwrite_file_with_lock(apr_global_mutex_t*lock,apr_file_t*fd,char*str) {
292+
staticintwrite_file_with_lock(apr_global_mutex_t*lock,apr_file_t*fd,char*str) {
293293
intrc;
294294
apr_size_tnbytes,nbytes_written;
295295

@@ -311,7 +311,7 @@ int write_file_with_lock(apr_global_mutex_t* lock, apr_file_t* fd, char* str) {
311311
returnWAF_LOG_UTIL_SUCCESS;
312312
}
313313

314-
char*waf_current_logtime(apr_pool_t*mp) {
314+
staticchar*waf_current_logtime(apr_pool_t*mp) {
315315
apr_time_exp_tt;
316316
chartstr[100];
317317
apr_size_tlen;
@@ -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-
voidsend_waf_log(apr_global_mutex_t*lock,apr_file_t*fd,constchar*str1,constchar*ip_port,constchar*uri,constchar*time,intmode,constchar*hostname,request_rec*r) {
328+
staticvoidsend_waf_log(apr_global_mutex_t*lock,apr_file_t*fd,constchar*str1,constchar*ip_port,constchar*uri,constchar*time,intmode,constchar*hostname,request_rec*r) {
329329
intrc=0;
330330
char*json_str;
331331
charwaf_filename[1024]="";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp