Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
50036e85
Commit
50036e85
authored
Aug 07, 2001
by
Peter Eisentraut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a check for end of client connection before expecting a password
response, to avoid noise in the server log.
parent
2f4759d5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
4 deletions
+25
-4
src/backend/libpq/auth.c
src/backend/libpq/auth.c
+2
-2
src/backend/libpq/pqcomm.c
src/backend/libpq/pqcomm.c
+21
-1
src/include/libpq/libpq.h
src/include/libpq/libpq.h
+2
-1
No files found.
src/backend/libpq/auth.c
View file @
50036e85
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.5
5 2001/08/01 23:25:39 tgl
Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.5
6 2001/08/07 10:44:13 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -554,7 +554,7 @@ recv_and_check_password_packet(Port *port)
int32
len
;
int
result
;
if
(
pq_getint
(
&
len
,
4
)
==
EOF
)
if
(
pq_
eof
()
==
EOF
||
pq_
getint
(
&
len
,
4
)
==
EOF
)
return
STATUS_ERROR
;
/* client didn't want to send password */
initStringInfo
(
&
buf
);
pq_getstr
(
&
buf
);
...
...
src/backend/libpq/pqcomm.c
View file @
50036e85
...
...
@@ -29,7 +29,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pqcomm.c,v 1.1
19 2001/08/05 01:22:16 tgl
Exp $
* $Id: pqcomm.c,v 1.1
20 2001/08/07 10:44:15 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -695,6 +695,26 @@ pq_flush(void)
}
/*
* Return EOF if the connection has been broken, else 0.
*/
int
pq_eof
(
void
)
{
char
x
;
int
res
;
res
=
recv
(
MyProcPort
->
sock
,
&
x
,
1
,
MSG_PEEK
);
if
(
res
==
-
1
)
fprintf
(
stderr
,
"pq_eof: recv() failed: %s
\n
"
,
strerror
(
errno
));
else
if
(
res
==
0
)
return
EOF
;
else
return
0
;
}
/* --------------------------------
* Message-level I/O routines begin here.
*
...
...
src/include/libpq/libpq.h
View file @
50036e85
...
...
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq.h,v 1.4
4 2001/03/22 04:00:48 momjian
Exp $
* $Id: libpq.h,v 1.4
5 2001/08/07 10:44:16 petere
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -65,6 +65,7 @@ extern int pq_getstring(StringInfo s);
extern
int
pq_peekbyte
(
void
);
extern
int
pq_putbytes
(
const
char
*
s
,
size_t
len
);
extern
int
pq_flush
(
void
);
extern
int
pq_eof
(
void
);
extern
int
pq_putmessage
(
char
msgtype
,
const
char
*
s
,
size_t
len
);
extern
void
pq_startcopyout
(
void
);
extern
void
pq_endcopyout
(
bool
errorAbort
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment