From 456213a34dd85b40e2f8a1c3af237db315fd0123 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 27 Jun 2022 14:27:39 -0400 Subject: [PATCH] TT#182200 extra debugging output This makes it possible to trace which CDR record was created from which acc records and at which point. Change-Id: I3645ccf244bf7d86b6f70181c57e47dfa204f7b9 (cherry picked from commit 64d50ee70119da08ef7fc30cd484e2fcd5445dc8) --- medmysql.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/medmysql.c b/medmysql.c index 688c351..0e96559 100644 --- a/medmysql.c +++ b/medmysql.c @@ -978,6 +978,8 @@ int medmysql_insert_cdrs(cdr_entry_t *entries, uint64_t count, struct medmysql_b snprintf(str_source_accid, sizeof(str_source_accid), "%llu", (long long unsigned int) e->source_account_id); snprintf(str_dest_accid, sizeof(str_dest_accid), "%llu", (long long unsigned int) e->destination_account_id); + const char *begin_ptr = batch->cdrs.str + batch->cdrs.len; + CDRPRINT("(NULL, now(), "); CDRESCAPE(e->source_user_id); CDRPRINT(","); @@ -1113,6 +1115,9 @@ int medmysql_insert_cdrs(cdr_entry_t *entries, uint64_t count, struct medmysql_b CDRPRINT("),"); + const char *end_ptr = batch->cdrs.str + batch->cdrs.len; + L_DEBUG("CDR entry to be written: %.*s", (int) (end_ptr - begin_ptr), begin_ptr); + if (medmysql_tag_cdr(batch, medmysql_tag_provider_customer, medmysql_tag_direction_destination, "furnished_charging_info", e->furnished_charging_info, e)) return -1;