summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/libpq-int.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2014-04-16 10:45:48 -0400
committerBruce Momjian <bruce@momjian.us>2014-04-16 10:45:48 -0400
commit41809346518a2b57530b22148609a346a718adc9 (patch)
tree961b8f02438fed1b5a453890a899ff0351bb7f93 /src/interfaces/libpq/libpq-int.h
parent848b9f05ab283724dd063d936a92568c1fdf422b (diff)
downloadpostgresql-41809346518a2b57530b22148609a346a718adc9.tar.gz
check socket creation errors against PGINVALID_SOCKET
Previously, in some places, socket creation errors were checked for negative values, which is not true for Windows because sockets are unsigned. This masked socket creation errors on Windows. Backpatch through 9.0. 8.4 doesn't have the infrastructure to fix this.
Diffstat (limited to 'src/interfaces/libpq/libpq-int.h')
-rw-r--r--src/interfaces/libpq/libpq-int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/interfaces/libpq/libpq-int.h b/src/interfaces/libpq/libpq-int.h
index 22bbe4a48e..ee975d41fa 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -364,6 +364,7 @@ struct pg_conn
PGnotify *notifyTail; /* newest unreported Notify msg */
/* Connection data */
+ /* See PQconnectPoll() for how we use 'int' and not 'pgsocket'. */
int sock; /* Unix FD for socket, -1 if not connected */
SockAddr laddr; /* Local address */
SockAddr raddr; /* Remote address */