merge changes from 'master' into 1.7

1.7 1.7.1
Kirill Solomko 13 years ago
parent 60a72ffa73
commit 06440fa591

8
debian/changelog vendored

@ -1,3 +1,11 @@
ngcp-mediator (1.7.1) unstable; urgency=low
[ Kirill Solomko ]
* [f89c788] MT#5257 - only distint acc records are selected per callid,
removed unused acc.id field selection
-- Kirill Solomko <ksolomko@sipwise.com> Tue, 04 Dec 2013 17:47:34 +0100
ngcp-mediator (1.7.0) unstable; urgency=low
[ agranig ]

@ -64,7 +64,6 @@ typedef struct {
char callid[256];
char timestamp[24];
double unix_timestamp;
u_int64_t med_id;
u_int8_t valid;
med_method_t method;
char sip_method[32];

@ -9,8 +9,8 @@
/*#define MED_CALLID_QUERY "(select a.callid, a.time from acc a, acc b where a.callid = b.callid and a.method = 'INVITE' and b.method = 'BYE' group by callid) union (select callid, time from acc where method = 'INVITE' and sip_code != '200') order by time asc limit 0,200000"*/
#define MED_CALLID_QUERY "select a.callid from acc a left join acc b on a.callid = b.callid and b.method = 'BYE' where a.method = 'INVITE' and (a.sip_code != '200' or b.id is not null) group by a.callid limit 0,200000"
#define MED_FETCH_QUERY "select sip_code, sip_reason, method, callid, time, time_hires, " \
"src_leg, dst_leg, id " \
#define MED_FETCH_QUERY "select distinct sip_code, sip_reason, method, callid, time, time_hires, " \
"src_leg, dst_leg " \
"from acc where callid = '%s' order by time_hires asc"
#define MED_LOAD_PEER_QUERY "select h.ip, h.host, g.peering_contract_id " \
@ -242,7 +242,6 @@ int medmysql_fetch_records(med_callid_t *callid,
e->unix_timestamp = atof(row[5]);
g_strlcpy(e->src_leg, row[6], sizeof(e->src_leg));
g_strlcpy(e->dst_leg, row[7], sizeof(e->dst_leg));
e->med_id = atoll(row[8]);
e->valid = 1;
if (check_shutdown())

Loading…
Cancel
Save