Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
f2eba413
Commit
f2eba413
authored
Nov 26, 2010
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use conn->raddr consistently for non-connect libpq error reporting.
parent
bad8277f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-connect.c
+5
-3
No files found.
src/interfaces/libpq/fe-connect.c
View file @
f2eba413
...
@@ -989,6 +989,8 @@ connectFailureMessage(PGconn *conn, int errorno)
...
@@ -989,6 +989,8 @@ connectFailureMessage(PGconn *conn, int errorno)
{
{
char
host_addr
[
NI_MAXHOST
];
char
host_addr
[
NI_MAXHOST
];
bool
display_host_addr
;
bool
display_host_addr
;
struct
sockaddr_in
*
host_addr_struct
=
(
struct
sockaddr_in
*
)
&
conn
->
raddr
.
addr
;
/*
/*
* Optionally display the network address with the hostname.
* Optionally display the network address with the hostname.
...
@@ -996,9 +998,9 @@ connectFailureMessage(PGconn *conn, int errorno)
...
@@ -996,9 +998,9 @@ connectFailureMessage(PGconn *conn, int errorno)
*/
*/
if
(
conn
->
pghostaddr
!=
NULL
)
if
(
conn
->
pghostaddr
!=
NULL
)
strlcpy
(
host_addr
,
conn
->
pghostaddr
,
NI_MAXHOST
);
strlcpy
(
host_addr
,
conn
->
pghostaddr
,
NI_MAXHOST
);
else
if
(
inet_net_ntop
(
conn
->
addr_cur
->
ai
_family
,
else
if
(
inet_net_ntop
(
host_addr_struct
->
sin
_family
,
&
conn
->
addr_cur
->
ai
_addr
,
&
host_addr_struct
->
sin_addr
.
s
_addr
,
conn
->
addr_cur
->
ai
_family
==
AF_INET
?
32
:
128
,
host_addr_struct
->
sin
_family
==
AF_INET
?
32
:
128
,
host_addr
,
sizeof
(
host_addr
))
==
NULL
)
host_addr
,
sizeof
(
host_addr
))
==
NULL
)
strcpy
(
host_addr
,
"???"
);
strcpy
(
host_addr
,
"???"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment