From 5bff76e944ac59557f77447dbc949bf57acdf4f3 Mon Sep 17 00:00:00 2001 From: Daniel Tiefnig Date: Wed, 21 Dec 2011 09:48:36 +0000 Subject: [PATCH] fix bug in acc_trash query, which causes mediator to fail This should affect *all* 2.4 installations, none of them will have a working mediator ATM! --- medmysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/medmysql.c b/medmysql.c index 567f900..b1254b5 100644 --- a/medmysql.c +++ b/medmysql.c @@ -257,7 +257,7 @@ int medmysql_trash_entries(const char *callid, struct medmysql_batches *batches) } if (batches->acc_trash.len == 0) - batches->acc_trash.len = sprintf(batches->acc_trash.str, "insert into acc_trash (method, from_tag, to_tag, callid, sip_code, sip_reason, time, time_hires, src_leg, dst_leg, dst_user, dst_ouser, dst_domain, src_user, src_domain) select method, from_tag, to_tag, callid, sip_code, sip_reason, time_hires, src_leg, dst_leg, dst_user, dst_ouser, dst_domain, src_user, src_domain from acc where callid in ("); + batches->acc_trash.len = sprintf(batches->acc_trash.str, "insert into acc_trash (method, from_tag, to_tag, callid, sip_code, sip_reason, time, time_hires, src_leg, dst_leg, dst_user, dst_ouser, dst_domain, src_user, src_domain) select method, from_tag, to_tag, callid, sip_code, sip_reason, time, time_hires, src_leg, dst_leg, dst_user, dst_ouser, dst_domain, src_user, src_domain from acc where callid in ("); batches->acc_trash.len += sprintf(batches->acc_trash.str + batches->acc_trash.len, "'%s',", callid);