summaryrefslogtreecommitdiff
path: root/security/pam_pop3/files/patch-pam_pop3.c
blob: 6eff9e2bf73c039fd6eeca3b8c4254147839244b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- pam_pop3.c.orig	Tue Jul 16 00:14:29 2002
+++ pam_pop3.c	Tue Jul 16 00:16:38 2002
@@ -21,6 +21,7 @@
 #include <errno.h>
 #include <netdb.h>
 #include <sys/types.h>
+#include <sys/time.h>
 #include <netinet/in.h>
 #include <sys/socket.h>
 
@@ -85,7 +86,7 @@
 		close(sockfd);
 		return -1;
 	}
-	if ((numbytes=recv(sockfd,buf,BUFLEN-1,MSG_NOSIGNAL))<=0)
+	if ((numbytes=recv(sockfd,buf,BUFLEN-1,0))<=0)
 	{
 		if (numbytes==0)
 	/* other side closed connection */
@@ -138,7 +139,7 @@
 		close(sockfd);
 		return -1;
 	}
-	if ((numbytes=send(sockfd,buf,strlen(buf),MSG_NOSIGNAL))<strlen(buf)) 
+	if ((numbytes=send(sockfd,buf,strlen(buf),0))<strlen(buf)) 
 	{
 /* it did not send everything, try once more and then fail */
 		if (numbytes>0)
@@ -153,7 +154,7 @@
 			return -1;
 		}
 			/* send remaining bytes */
-			numbytes+=send(sockfd,buf+numbytes,strlen(buf)-numbytes,MSG_NOSIGNAL);
+			numbytes+=send(sockfd,buf+numbytes,strlen(buf)-numbytes,0);
 		}
 		if (numbytes!=strlen(buf))
 		{