Commit 6d9d97e8 authored by Bruce Momjian's avatar Bruce Momjian

Restore ptmp_timeout for cases where no timeout is passed.

parent 9eada510
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.81 2002/10/14 17:15:11 momjian Exp $ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.82 2002/10/14 17:33:08 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -790,6 +790,7 @@ pqWaitTimed(int forRead, int forWrite, PGconn *conn, const struct timeval *timeo ...@@ -790,6 +790,7 @@ pqWaitTimed(int forRead, int forWrite, PGconn *conn, const struct timeval *timeo
fd_set except_mask; fd_set except_mask;
struct timeval tmp_timeout; struct timeval tmp_timeout;
struct timeval *ptmp_timeout = NULL;
if (conn->sock < 0) if (conn->sock < 0)
{ {
...@@ -826,9 +827,10 @@ retry5: ...@@ -826,9 +827,10 @@ retry5:
* use copy * use copy
*/ */
tmp_timeout = *timeout; tmp_timeout = *timeout;
ptmp_timeout = &tmp_timeout;
} }
if (select(conn->sock + 1, &input_mask, &output_mask, if (select(conn->sock + 1, &input_mask, &output_mask,
&except_mask, &tmp_timeout) < 0) &except_mask, ptmp_timeout) < 0)
{ {
if (SOCK_ERRNO == EINTR) if (SOCK_ERRNO == EINTR)
goto retry5; goto retry5;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment