mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-11-04 05:15:22 +00:00 
			
		
		
		
	Fixes from bkw_. Formatting in app_db.c and handle start right in cdr_pgsql.c
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
		@@ -49,18 +49,14 @@ PGresult	*result;
 | 
			
		||||
static int pgsql_log(struct ast_cdr *cdr)
 | 
			
		||||
{
 | 
			
		||||
	struct tm tm;
 | 
			
		||||
	struct timeval tv;
 | 
			
		||||
	char sqlcmd[2048], timestr[128];
 | 
			
		||||
	time_t t;
 | 
			
		||||
        char *pgerror;
 | 
			
		||||
	char *pgerror;
 | 
			
		||||
 | 
			
		||||
	ast_mutex_lock(&pgsql_lock);
 | 
			
		||||
 | 
			
		||||
	memset(sqlcmd,0,2048);
 | 
			
		||||
 | 
			
		||||
	gettimeofday(&tv,NULL);
 | 
			
		||||
	t = tv.tv_sec;
 | 
			
		||||
	localtime_r(&t,&tm);
 | 
			
		||||
	localtime_r(&cdr->start.tv_sec,&tm);
 | 
			
		||||
	strftime(timestr,128,DATE_FORMAT,&tm);
 | 
			
		||||
 | 
			
		||||
	if ((!connected) && pghostname && pgdbuser && pgpassword && pgdbname) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user