Browse code

acc_json: use the variable for the time key

(cherry picked from commit 3e2b5d9ed6a0f18199359444c5ae33a1d6b94eb2)

Daniel-Constantin Mierla authored on 22/09/2022 18:32:52
Showing 1 changed files
... ...
@@ -311,9 +311,9 @@ int acc_json_send_request(struct sip_msg *req, acc_info_t *inf)
311 311
 				<= 0) {
312 312
 			acc_time_format_buf[0] = '\0';
313 313
 		}
314
-		json_object_set_new(object, "time", json_string(acc_time_format_buf));
314
+		json_object_set_new(object, acc_time_key.s, json_string(acc_time_format_buf));
315 315
 	} else { // default acc_time_mode==1
316
-		json_object_set_new(object, "time", json_integer(inf->env->ts));
316
+		json_object_set_new(object, acc_time_key.s, json_integer(inf->env->ts));
317 317
 	}
318 318
 
319 319
 	LM_DBG("text[%.*s]\n", inf->env->text.len, inf->env->text.s);