diff --git a/cdr.c b/cdr.c index b07da03..d81365d 100644 --- a/cdr.c +++ b/cdr.c @@ -48,8 +48,8 @@ static void free_cdrs(cdr_entry_t **cdrs, uint64_t cdr_count) { for (uint64_t i = 0; i < cdr_count; i++) { cdr_entry_t *cdr = &(*cdrs)[i]; -#define F(f, l) g_string_free(cdr->f, TRUE); -#define FA(f, a, l) for (unsigned int j = 0; j < a; j++) g_string_free(cdr->f[j], TRUE); +#define F(f) g_string_free(cdr->f, TRUE); +#define FA(f, a) for (unsigned int j = 0; j < a; j++) g_string_free(cdr->f[j], TRUE); #include "cdr_field_names.inc" @@ -1374,8 +1374,8 @@ static cdr_entry_t *alloc_cdrs(uint64_t cdr_count) { for (uint64_t i = 0; i < cdr_count; i++) { cdr_entry_t *cdr = &cdrs[i]; -#define F(f, l) cdr->f = g_string_new(""); -#define FA(f, a, l) for (unsigned int j = 0; j < a; j++) cdr->f[j] = g_string_new(""); +#define F(f) cdr->f = g_string_new(""); +#define FA(f, a) for (unsigned int j = 0; j < a; j++) cdr->f[j] = g_string_new(""); #include "cdr_field_names.inc" diff --git a/cdr.h b/cdr.h index 2c954a9..ade2397 100644 --- a/cdr.h +++ b/cdr.h @@ -25,8 +25,8 @@ typedef struct { int avg_rtt; } mos_data_t; -#define F(f, l) GString *f; -#define FA(f, a, l) GString *f[a]; +#define F(f) GString *f; +#define FA(f, a) GString *f[a]; typedef struct { #include "cdr_field_names.inc" diff --git a/cdr_field_names.inc b/cdr_field_names.inc index 666e685..36e0a17 100644 --- a/cdr_field_names.inc +++ b/cdr_field_names.inc @@ -1,52 +1,52 @@ -F(call_id, 128) - -F(source_user_id, 37) -F(source_ext_subscriber_id, 256) -F(source_ext_contract_id, 256) -F(source_provider_id, 256) -F(source_user, 256) -F(source_domain, 256) -F(source_cli, 65) -F(source_ip, 65) -FA(source_gpp, 10, 255) -F(source_lnp_prefix, 256) -F(source_user_out, 256) -F(source_lnp_type, 256) - -F(destination_user_id, 37) -F(destination_provider_id, 256) -F(destination_ext_subscriber_id, 256) -F(destination_ext_contract_id, 256) -F(destination_user, 256) -F(destination_domain, 256) -F(destination_user_in, 256) -F(destination_domain_in, 256) -F(destination_dialed, 256) -FA(destination_gpp, 10, 255) -F(destination_lnp_prefix, 256) -F(destination_user_out, 256) -F(destination_lnp_type, 256) - -F(call_type, 8) -F(call_status, 16) -F(call_code, 4) - -F(peer_auth_user, 256) -F(peer_auth_realm, 256) - -F(furnished_charging_info, 256) -F(header_diversion, 2048) -F(header_pai, 2048) -F(header_u2u, 256) - -F(group, 256) - -F(source_concurrent_calls_quota, 32) -F(source_concurrent_calls_count, 32) -F(source_concurrent_calls_count_customer, 32) -F(destination_concurrent_calls_quota, 32) -F(destination_concurrent_calls_count, 32) -F(destination_concurrent_calls_count_customer, 32) -F(source_last_hih, 32) - -F(acc_ref, 256) +F(call_id) + +F(source_user_id) +F(source_ext_subscriber_id) +F(source_ext_contract_id) +F(source_provider_id) +F(source_user) +F(source_domain) +F(source_cli) +F(source_ip) +FA(source_gpp, 10) +F(source_lnp_prefix) +F(source_user_out) +F(source_lnp_type) + +F(destination_user_id) +F(destination_provider_id) +F(destination_ext_subscriber_id) +F(destination_ext_contract_id) +F(destination_user) +F(destination_domain) +F(destination_user_in) +F(destination_domain_in) +F(destination_dialed) +FA(destination_gpp, 10) +F(destination_lnp_prefix) +F(destination_user_out) +F(destination_lnp_type) + +F(call_type) +F(call_status) +F(call_code) + +F(peer_auth_user) +F(peer_auth_realm) + +F(furnished_charging_info) +F(header_diversion) +F(header_pai) +F(header_u2u) + +F(group) + +F(source_concurrent_calls_quota) +F(source_concurrent_calls_count) +F(source_concurrent_calls_count_customer) +F(destination_concurrent_calls_quota) +F(destination_concurrent_calls_count) +F(destination_concurrent_calls_count_customer) +F(source_last_hih) + +F(acc_ref)