mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
Portability fix for devmode compiling (closes bug #10382)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@78146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -71,13 +71,14 @@ static PGconn *conn = NULL;
|
||||
static int pgsql_log(struct ast_cdr *cdr)
|
||||
{
|
||||
struct tm tm;
|
||||
time_t t = cdr->start.tv_sec;
|
||||
char sqlcmd[2048] = "", timestr[128];
|
||||
char *pgerror;
|
||||
PGresult *result;
|
||||
|
||||
ast_mutex_lock(&pgsql_lock);
|
||||
|
||||
ast_localtime(&cdr->start.tv_sec, &tm, NULL);
|
||||
ast_localtime(&t, &tm, NULL);
|
||||
strftime(timestr, sizeof(timestr), DATE_FORMAT, &tm);
|
||||
|
||||
if ((!connected) && pghostname && pgdbuser && pgpassword && pgdbname) {
|
||||
|
Reference in New Issue
Block a user