mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-24 14:56:58 +00:00
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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user