aboutsummaryrefslogtreecommitdiff
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
commit966f015b60d90f6450cbadcbfa89e21408fe52f9 (patch)
tree2b1bcc74ac9cfbef514fb19cea89b3cf95a899d7 /src/interfaces/libpq/libpq-int.h
parenta4c4e0bf60f0f8dbe2556fabd94eb827ae376032 (diff)
downloadpostgresql-966f015b60d90f6450cbadcbfa89e21408fe52f9.tar.gz
postgresql-966f015b60d90f6450cbadcbfa89e21408fe52f9.zip
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 2bac59c3d87..2513766f591 100644
--- a/src/interfaces/libpq/libpq-int.h
+++ b/src/interfaces/libpq/libpq-int.h
@@ -361,6 +361,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 */