|
10 | 10 | * |
11 | 11 | * |
12 | 12 | * IDENTIFICATION |
13 | | - * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.77 2001/11/05 17:46:25 momjian Exp $ |
| 13 | + * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.78 2001/11/12 04:29:23 tgl Exp $ |
14 | 14 | * |
15 | 15 | *------------------------------------------------------------------------- |
16 | 16 | */ |
@@ -820,15 +820,19 @@ ident_inet(const struct in_addr remote_ip_addr, |
820 | 820 | /* The query we send to the Ident server */ |
821 | 821 | snprintf(ident_query,80,"%d,%d\n", |
822 | 822 | ntohs(remote_port),ntohs(local_port)); |
823 | | -rc=send(sock_fd,ident_query,strlen(ident_query),0); |
| 823 | +/* loop in case send is interrupted */ |
| 824 | +do { |
| 825 | +rc=send(sock_fd,ident_query,strlen(ident_query),0); |
| 826 | +}while (rc<0&&errno==EINTR); |
824 | 827 | if (rc<0) |
825 | 828 | { |
826 | 829 | snprintf(PQerrormsg,PQERRORMSG_LENGTH, |
827 | 830 | "Unable to send query to Ident server on the host which is " |
828 | 831 | "trying to connect to Postgres (Host %s, Port %d)," |
829 | 832 | "even though we successfully connected to it. " |
830 | 833 | "errno = %s (%d)\n", |
831 | | -inet_ntoa(remote_ip_addr),IDENT_PORT,strerror(errno),errno); |
| 834 | +inet_ntoa(remote_ip_addr),IDENT_PORT, |
| 835 | +strerror(errno),errno); |
832 | 836 | fputs(PQerrormsg,stderr); |
833 | 837 | pqdebug("%s",PQerrormsg); |
834 | 838 | ident_return= false; |
|