From 1f19898ae5981618f1e6605fcb948ba9a1da1e2d Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Mon, 31 Oct 2011 15:37:21 +0000 Subject: [PATCH] Add time_hires to field list when moving acc records. --- medmysql.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/medmysql.c b/medmysql.c index 4808067..469bce4 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, 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, 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_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); @@ -273,7 +273,7 @@ int medmysql_backup_entries(const char *callid, struct medmysql_batches *batches } if (batches->acc_backup.len == 0) - batches->acc_backup.len = sprintf(batches->acc_backup.str, "insert into acc_backup (method, from_tag, to_tag, callid, sip_code, sip_reason, time, 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, src_leg, dst_leg, dst_user, dst_ouser, dst_domain, src_user, src_domain from acc where callid in ("); + batches->acc_backup.len = sprintf(batches->acc_backup.str, "insert into acc_backup (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_backup.len += sprintf(batches->acc_backup.str + batches->acc_backup.len, "'%s',", callid);