Merge bkw_'s ODBC patch

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3395 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-07-08 13:18:04 +00:00
parent 12b3b6c86e
commit 65fc87b245
2 changed files with 2 additions and 6 deletions

View File

@@ -59,12 +59,8 @@ static int odbc_log(struct ast_cdr *cdr)
char sqlcmd[2048], timestr[128];
int res = 0;
struct tm tm;
struct timeval tv;
time_t t;
gettimeofday(&tv,NULL);
t = tv.tv_sec;
localtime_r(&t,&tm);
localtime_r(&cdr->start.tv_sec,&tm);
ast_mutex_lock(&odbc_lock);
strftime(timestr,128,DATE_FORMAT,&tm);