1313 *
1414 *Copyright (c) 2001-2003, PostgreSQL Global Development Group
1515 *
16- *$Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.43 2003/08/12 16:21:18 tgl Exp $
16+ *$Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.44 2003/09/07 14:44:40 tgl Exp $
1717 * ----------
1818 */
1919#include "postgres.h"
@@ -1591,8 +1591,6 @@ pgstat_recvbuffer(void)
15911591int msg_send = 0 ;/* next send index in buffer */
15921592int msg_recv = 0 ;/* next receive index */
15931593int msg_have = 0 ;/* number of bytes stored */
1594- struct sockaddr_storage fromaddr ;
1595- int fromlen ;
15961594bool overflow = false;
15971595
15981596/*
@@ -1702,10 +1700,8 @@ pgstat_recvbuffer(void)
17021700 */
17031701if (FD_ISSET (pgStatSock ,& rfds ))
17041702{
1705- fromlen = sizeof (fromaddr );
1706- len = recvfrom (pgStatSock , (char * )& input_buffer ,
1707- sizeof (PgStat_Msg ),0 ,
1708- (struct sockaddr * )& fromaddr ,& fromlen );
1703+ len = recv (pgStatSock , (char * )& input_buffer ,
1704+ sizeof (PgStat_Msg ),0 );
17091705if (len < 0 )
17101706{
17111707ereport (LOG ,
@@ -1726,16 +1722,6 @@ pgstat_recvbuffer(void)
17261722if (input_buffer .msg_hdr .m_size != len )
17271723continue ;
17281724
1729- /*
1730- * The source address of the packet must be our own socket.
1731- * This ensures that only real hackers or our own backends
1732- * tell us something. (This should be redundant with a
1733- * kernel-level check due to having used connect(), but let's
1734- * do it anyway.)
1735- */
1736- if (memcmp (& fromaddr ,& pgStatAddr ,fromlen ))
1737- continue ;
1738-
17391725/*
17401726 * O.K. - we accept this message. Copy it to the circular
17411727 * msgbuffer.