Browse code

acc_json: code formatting updates

Daniel-Constantin Mierla authored on 22/09/2022 18:41:32
Showing 1 changed files
... ...
@@ -101,37 +101,41 @@ str cdr_json_pre_encoded_prefix = {0, 0};
101 101
 static cmd_export_t cmds[] = {{0, 0, 0, 0, 0, 0}};
102 102
 
103 103
 
104
-static param_export_t params[] = {{"acc_flag", INT_PARAM, &acc_flag},
105
-		{"acc_missed_flag", INT_PARAM, &acc_missed_flag},
106
-		{"acc_extra", PARAM_STRING, &acc_extra_str},
107
-		{"acc_pre_encoded_prefix", PARAM_STRING, &acc_json_pre_encoded_prefix_str},
108
-		{"acc_time_mode", INT_PARAM, &acc_time_mode},
109
-		{"acc_time_format", PARAM_STRING, &acc_time_format},
110
-		{"acc_log_level", INT_PARAM, &acc_log_level},
111
-		{"acc_log_facility", PARAM_STRING, &acc_log_facility_str},
112
-		{"acc_output_mqueue", PARAM_STRING, &acc_output_mqueue_str},
113
-		{"acc_output_syslog", INT_PARAM, &acc_output_syslog},
114
-		{"cdr_extra", PARAM_STRING, &cdr_extra_str},
115
-		{"cdr_pre_encoded_prefix", PARAM_STRING, &cdr_json_pre_encoded_prefix_str},
116
-		{"cdr_enable", INT_PARAM, &cdr_enable},
117
-		{"cdr_expired_dlg_enable", INT_PARAM, &cdr_expired_dlg_enable},
118
-		{"cdr_log_level", INT_PARAM, &cdr_log_level},
119
-		{"cdr_log_facility", PARAM_STRING, &cdr_log_facility_str},
120
-		{"cdr_output_mqueue", PARAM_STRING, &cdr_output_mqueue_str},
121
-		{"cdr_output_syslog", INT_PARAM, &cdr_output_syslog}, {0, 0, 0}};
104
+static param_export_t params[] = {
105
+	{"acc_flag", INT_PARAM, &acc_flag},
106
+	{"acc_missed_flag", INT_PARAM, &acc_missed_flag},
107
+	{"acc_extra", PARAM_STRING, &acc_extra_str},
108
+	{"acc_pre_encoded_prefix", PARAM_STRING, &acc_json_pre_encoded_prefix_str},
109
+	{"acc_time_mode", INT_PARAM, &acc_time_mode},
110
+	{"acc_time_format", PARAM_STRING, &acc_time_format},
111
+	{"acc_log_level", INT_PARAM, &acc_log_level},
112
+	{"acc_log_facility", PARAM_STRING, &acc_log_facility_str},
113
+	{"acc_output_mqueue", PARAM_STRING, &acc_output_mqueue_str},
114
+	{"acc_output_syslog", INT_PARAM, &acc_output_syslog},
115
+	{"cdr_extra", PARAM_STRING, &cdr_extra_str},
116
+	{"cdr_pre_encoded_prefix", PARAM_STRING, &cdr_json_pre_encoded_prefix_str},
117
+	{"cdr_enable", INT_PARAM, &cdr_enable},
118
+	{"cdr_expired_dlg_enable", INT_PARAM, &cdr_expired_dlg_enable},
119
+	{"cdr_log_level", INT_PARAM, &cdr_log_level},
120
+	{"cdr_log_facility", PARAM_STRING, &cdr_log_facility_str},
121
+	{"cdr_output_mqueue", PARAM_STRING, &cdr_output_mqueue_str},
122
+	{"cdr_output_syslog", INT_PARAM, &cdr_output_syslog},
123
+
124
+	{0, 0, 0}
125
+};
122 126
 
123 127
 
124 128
 struct module_exports exports = {
125
-		"acc_json", 
126
-                DEFAULT_DLFLAGS, /* dlopen flags */
127
-		cmds,		 /* exported functions */
128
-		params,		 /* exported params */
129
-		0,		 /* exported RPC methods */
130
-		0,		 /* exported pseudo-variables */
131
-		0,		 /* response function */
132
-		mod_init,	 /* initialization module */
133
-		child_init,	 /* per-child init function */
134
-		destroy	 	 /* destroy function */
129
+	"acc_json",
130
+	DEFAULT_DLFLAGS, /* dlopen flags */
131
+	cmds,		 /* exported functions */
132
+	params,		 /* exported params */
133
+	0,		 /* exported RPC methods */
134
+	0,		 /* exported pseudo-variables */
135
+	0,		 /* response function */
136
+	mod_init,	 /* initialization module */
137
+	child_init,	 /* per-child init function */
138
+	destroy	 	 /* destroy function */
135 139
 };
136 140
 
137 141
 
... ...
@@ -306,8 +310,7 @@ int acc_json_send_request(struct sip_msg *req, acc_info_t *inf)
306 310
 		} else {
307 311
 			t = gmtime(&inf->env->ts);
308 312
 		}
309
-		if(strftime(acc_time_format_buf, ACC_TIME_FORMAT_SIZE, acc_time_format,
310
-				   t)
313
+		if(strftime(acc_time_format_buf, ACC_TIME_FORMAT_SIZE, acc_time_format, t)
311 314
 				<= 0) {
312 315
 			acc_time_format_buf[0] = '\0';
313 316
 		}