mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +00:00
reverting changes made by r229095 as they are not applicable to 1.6.1
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@229098 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -667,6 +667,7 @@ static int update_pgsql(const char *database, const char *tablename, const char
|
|||||||
ast_debug(1, "PostgreSQL RealTime: Query: %s\n", sql->str);
|
ast_debug(1, "PostgreSQL RealTime: Query: %s\n", sql->str);
|
||||||
ast_debug(1, "PostgreSQL RealTime: Query Failed because: %s\n", PQerrorMessage(pgsqlConn));
|
ast_debug(1, "PostgreSQL RealTime: Query Failed because: %s\n", PQerrorMessage(pgsqlConn));
|
||||||
ast_mutex_unlock(&pgsql_lock);
|
ast_mutex_unlock(&pgsql_lock);
|
||||||
|
ast_free(sql);
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
ExecStatusType result_status = PQresultStatus(result);
|
ExecStatusType result_status = PQresultStatus(result);
|
||||||
@@ -679,12 +680,14 @@ static int update_pgsql(const char *database, const char *tablename, const char
|
|||||||
ast_debug(1, "PostgreSQL RealTime: Query Failed because: %s (%s)\n",
|
ast_debug(1, "PostgreSQL RealTime: Query Failed because: %s (%s)\n",
|
||||||
PQresultErrorMessage(result), PQresStatus(result_status));
|
PQresultErrorMessage(result), PQresStatus(result_status));
|
||||||
ast_mutex_unlock(&pgsql_lock);
|
ast_mutex_unlock(&pgsql_lock);
|
||||||
|
ast_free(sql);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
numrows = atoi(PQcmdTuples(result));
|
numrows = atoi(PQcmdTuples(result));
|
||||||
ast_mutex_unlock(&pgsql_lock);
|
ast_mutex_unlock(&pgsql_lock);
|
||||||
|
ast_free(sql);
|
||||||
|
|
||||||
ast_debug(1, "PostgreSQL RealTime: Updated %d rows on table: %s\n", numrows, tablename);
|
ast_debug(1, "PostgreSQL RealTime: Updated %d rows on table: %s\n", numrows, tablename);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user