diff options
author | Bruce Momjian <bruce@momjian.us> | 2014-04-16 10:45:48 -0400 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2014-04-16 10:45:48 -0400 |
commit | 966f015b60d90f6450cbadcbfa89e21408fe52f9 (patch) | |
tree | 2b1bcc74ac9cfbef514fb19cea89b3cf95a899d7 /src/interfaces/libpq/libpq-int.h | |
parent | a4c4e0bf60f0f8dbe2556fabd94eb827ae376032 (diff) | |
download | postgresql-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.h | 1 |
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 */ |