Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11003eb

Browse files
committed
libpq: Fix inadvertent change in PQhost() behavior.
Commit274bb2b caused PQhost() toreturn the value of the hostaddr parameter rather than the relevanthost when the latter parameter was specified. That's wrong. Commit9a1d0af then amplified the damage byusing PQhost() in more places, so that the SSL test suite startedfailing.Report by Andreas Karlsson; patch by me.
1 parenta01a501 commit11003eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/interfaces/libpq/fe-connect.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5736,7 +5736,8 @@ PQhost(const PGconn *conn)
57365736
{
57375737
if (!conn)
57385738
returnNULL;
5739-
if (conn->connhost!=NULL)
5739+
if (conn->connhost!=NULL&&
5740+
conn->connhost[conn->whichhost].type!=CHT_HOST_ADDRESS)
57405741
returnconn->connhost[conn->whichhost].host;
57415742
elseif (conn->pghost!=NULL&&conn->pghost[0]!='\0')
57425743
returnconn->pghost;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp