Handle call forward on SIP

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2003-03-29 00:42:16 +00:00
parent 7674dff43d
commit 13d3fd287b
3 changed files with 28 additions and 10 deletions

View File

@@ -39,21 +39,18 @@ static MYSQL *mysql;
static int mysql_log(struct ast_cdr *cdr)
{
struct tm *tm;
struct timeval *tv;
struct timezone *tz;
char *sqlcmd, *timestr;
struct timeval tv;
struct timezone tz;
char *sqlcmd, timestr[128];
time_t t;
tv = (struct timeval *)malloc(sizeof(struct timeval));
tz = (struct timezone *)malloc(sizeof(struct timezone));
sqlcmd = (char *)malloc(2048);
timestr = (char*)malloc(128);
memset(sqlcmd,0,2048);
gettimeofday(tv,tz);
t = tv->tv_sec;
gettimeofday(&tv,&tz);
t = tv.tv_sec;
tm = localtime(&t);
strftime(timestr,128,DATE_FORMAT,tm);