]> git.ipfire.org Git - thirdparty/asterisk.git/commit
cdr_pgsql: fix error in connection string
authorChris-Savinovich <csavinovich@digium.com>
Tue, 4 Jun 2019 17:41:33 +0000 (12:41 -0500)
committerChris-Savinovich <csavinovich@digium.com>
Tue, 4 Jun 2019 18:37:34 +0000 (13:37 -0500)
commitc2621aa190a167f49e9bee9324db9d0540ee4b3a
tree79fd9c36387ea4dad771b2b2ac12e263402fc956
parenteefd53b7182644e6109e5a3b29f67ed032219cbe
cdr_pgsql: fix error in connection string

Fixes an error occurring in function pgsql_reconnect() caused when value of
hostname is blank. Which in turn will cause the connection string to look
like this: "host= port=xx", which creates a sintax error. This fix now checks
if the corresponding values for host, port, dbname, and user are blank. Note
that since this is a reconnect function the database library will replace any
missing value pairs with default ones.

ASTERISK-28435

Change-Id: I0a921f99bbd265768be08cd492f04b30855b8423
cdr/cdr_pgsql.c