Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6d9d97e

Browse files
committed
Restore ptmp_timeout for cases where no timeout is passed.
1 parent9eada51 commit6d9d97e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/interfaces/libpq/fe-misc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
*
2727
* IDENTIFICATION
28-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.81 2002/10/14 17:15:11 momjian Exp $
28+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.82 2002/10/14 17:33:08 momjian Exp $
2929
*
3030
*-------------------------------------------------------------------------
3131
*/
@@ -790,6 +790,7 @@ pqWaitTimed(int forRead, int forWrite, PGconn *conn, const struct timeval *timeo
790790
fd_setexcept_mask;
791791

792792
structtimevaltmp_timeout;
793+
structtimeval*ptmp_timeout=NULL;
793794

794795
if (conn->sock<0)
795796
{
@@ -826,9 +827,10 @@ pqWaitTimed(int forRead, int forWrite, PGconn *conn, const struct timeval *timeo
826827
*use copy
827828
*/
828829
tmp_timeout=*timeout;
830+
ptmp_timeout=&tmp_timeout;
829831
}
830832
if (select(conn->sock+1,&input_mask,&output_mask,
831-
&except_mask,&tmp_timeout)<0)
833+
&except_mask,ptmp_timeout)<0)
832834
{
833835
if (SOCK_ERRNO==EINTR)
834836
gotoretry5;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp