summaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
-rw-r--r--src/interfaces/libpq/fe-misc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index 726279291a9..fd33052f7cf 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -24,7 +24,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.23 1999/02/22 05:26:53 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.24 1999/05/25 16:15:13 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -471,6 +471,7 @@ pqFlush(PGconn *conn)
/* Prevent being SIGPIPEd if backend has closed the connection. */
#ifndef WIN32
pqsigfunc oldsighandler = pqsignal(SIGPIPE, SIG_IGN);
+
#endif
int sent = send(conn->sock, ptr, len, 0);
@@ -481,10 +482,11 @@ pqFlush(PGconn *conn)
if (sent < 0)
{
+
/*
- * Anything except EAGAIN or EWOULDBLOCK is trouble.
- * If it's EPIPE or ECONNRESET, assume we've lost the
- * backend connection permanently.
+ * Anything except EAGAIN or EWOULDBLOCK is trouble. If it's
+ * EPIPE or ECONNRESET, assume we've lost the backend
+ * connection permanently.
*/
switch (errno)
{
@@ -504,7 +506,7 @@ pqFlush(PGconn *conn)
"pqFlush() -- backend closed the channel unexpectedly.\n"
"\tThis probably means the backend terminated abnormally"
" before or while processing the request.\n");
- conn->status = CONNECTION_BAD; /* No more connection */
+ conn->status = CONNECTION_BAD; /* No more connection */
#ifdef WIN32
closesocket(conn->sock);
#else
@@ -514,7 +516,7 @@ pqFlush(PGconn *conn)
return EOF;
default:
sprintf(conn->errorMessage,
- "pqFlush() -- couldn't send data: errno=%d\n%s\n",
+ "pqFlush() -- couldn't send data: errno=%d\n%s\n",
errno, strerror(errno));
/* We don't assume it's a fatal error... */
return EOF;