Browse code

acc_json: moved global vars declaration to .c file

- made them static

Daniel-Constantin Mierla authored on 22/09/2022 18:30:52
Showing 2 changed files
... ...
@@ -37,6 +37,26 @@
37 37
 
38 38
 MODULE_VERSION
39 39
 
40
+static str acc_method_key = str_init("method");
41
+static str acc_fromtag_key = str_init("from_tag");
42
+static str acc_totag_key = str_init("to_tag");
43
+static str acc_callid_key = str_init("callid");
44
+static str acc_sipcode_key = str_init("sip_code");
45
+static str acc_sipreason_key = str_init("sip_reason");
46
+static str acc_time_key = str_init("time");
47
+
48
+static str cdr_start_str = str_init("start_time");
49
+static str cdr_end_str = str_init("end_time");
50
+static str cdr_duration_str = str_init("duration");
51
+
52
+static char acc_time_format_buf[ACC_TIME_FORMAT_SIZE];
53
+static char *acc_time_format = "%Y-%m-%d %H:%M:%S";
54
+
55
+static int acc_log_level = L_NOTICE;
56
+static int acc_log_facility = LOG_DAEMON;
57
+static int cdr_log_level = L_NOTICE;
58
+static int cdr_log_facility = LOG_DAEMON;
59
+
40 60
 static int mod_init(void);
41 61
 static void destroy(void);
42 62
 static int child_init(int rank);
... ...
@@ -24,25 +24,6 @@
24 24
 #ifndef _ACC_JSON_MOD_H_
25 25
 #define _ACC_JSON_MOD_H_
26 26
 
27
-str acc_method_key = str_init("method");
28
-str acc_fromtag_key = str_init("from_tag");
29
-str acc_totag_key = str_init("to_tag");
30
-str acc_callid_key = str_init("callid");
31
-str acc_sipcode_key = str_init("sip_code");
32
-str acc_sipreason_key = str_init("sip_reason");
33
-str acc_time_key = str_init("time");
34
-
35
-str cdr_start_str = str_init("start_time");
36
-str cdr_end_str = str_init("end_time");
37
-str cdr_duration_str = str_init("duration");
38
-
39 27
 #define ACC_TIME_FORMAT_SIZE 128
40
-static char acc_time_format_buf[ACC_TIME_FORMAT_SIZE];
41
-char *acc_time_format = "%Y-%m-%d %H:%M:%S";
42
-
43
-int acc_log_level = L_NOTICE;
44
-int acc_log_facility = LOG_DAEMON;
45
-int cdr_log_level = L_NOTICE;
46
-int cdr_log_facility = LOG_DAEMON;
47 28
 
48 29
 #endif