diff --git a/cdr.c b/cdr.c index 19b1ea6..ec5cf39 100644 --- a/cdr.c +++ b/cdr.c @@ -256,23 +256,13 @@ static int cdr_parse_srcleg(char *srcleg, cdr_entry_t *cdr) cdr->source_clir = atoi(tmp2); tmp2 = ++tmp1; - tmp1 = strchr(tmp2, MED_SEP); - if(tmp1 == NULL) + if(len < tmp2 - srcleg + 1) { syslog(LOG_WARNING, "Call-Id '%s' has no separated call type, '%s'", cdr->call_id, tmp2); return -1; } - *tmp1 = '\0'; g_strlcpy(cdr->call_type, tmp2, sizeof(cdr->call_type)); - tmp2 = ++tmp1; - - if(len < tmp2 - srcleg + 1) - { - syslog(LOG_WARNING, "Call-Id '%s' has no separated init time, '%s'", cdr->call_id, tmp2); - return -1; - } - cdr->init_time = g_strtod(tmp2, NULL); - + return 0; } diff --git a/cdr.h b/cdr.h index 1950f15..49aa814 100644 --- a/cdr.h +++ b/cdr.h @@ -47,7 +47,6 @@ typedef struct { char peer_auth_user[256]; char peer_auth_realm[256]; - double init_time; double start_time; double duration; diff --git a/debian/changelog b/debian/changelog index 6d2966e..a5caa6e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +ngcp-mediator (1.3.7) unstable; urgency=low + + * Revert last changes for 1.3, this will go into 1.4 + + -- Andrew Pogrebennyk Mon, 05 Mar 2012 20:32:19 +0100 + ngcp-mediator (1.3.6) unstable; urgency=low * Fixes wrong merging/tagging. diff --git a/medmysql.c b/medmysql.c index 25a5f34..7187a58 100644 --- a/medmysql.c +++ b/medmysql.c @@ -322,13 +322,12 @@ int medmysql_insert_cdrs(cdr_entry_t *entries, u_int64_t count, struct medmysql_ "source_cli, source_clir, "\ "destination_user_id, destination_provider_id, destination_external_subscriber_id, destination_external_contract_id, destination_account_id, destination_user, destination_domain, " \ "destination_user_in, destination_domain_in, destination_user_dialed, " \ - "peer_auth_user, peer_auth_realm, call_type, call_status, call_code, init_time, start_time, duration, call_id, " \ + "peer_auth_user, peer_auth_realm, call_type, call_status, call_code, start_time, duration, call_id, " \ "carrier_cost, reseller_cost, customer_cost) values "); } cdr_entry_t *e = &(entries[i]); char str_source_clir[2] = ""; - char str_init_time[32] = ""; char str_start_time[32] = ""; char str_duration[32] = ""; char str_carrier_cost[32] = ""; @@ -337,7 +336,6 @@ int medmysql_insert_cdrs(cdr_entry_t *entries, u_int64_t count, struct medmysql_ char str_source_accid[32] = ""; char str_dest_accid[32] = ""; snprintf(str_source_clir, sizeof(str_source_clir), "%u", e->source_clir); - snprintf(str_init_time, sizeof(str_init_time), "%f", e->init_time); snprintf(str_start_time, sizeof(str_start_time), "%f", e->start_time); snprintf(str_duration, sizeof(str_duration), "%f", e->duration); snprintf(str_carrier_cost, sizeof(str_carrier_cost), "%u", e->carrier_cost); @@ -397,8 +395,6 @@ int medmysql_insert_cdrs(cdr_entry_t *entries, u_int64_t count, struct medmysql_ CDRPRINT("','"); CDRESCAPE(e->call_code); CDRPRINT("',"); - CDRESCAPE(str_init_time); - CDRPRINT(","); CDRESCAPE(str_start_time); CDRPRINT(","); CDRESCAPE(str_duration);