git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix build for OpenSSL 3.0.0 . Bug 2810
[exim.git]
/
src
/
src
/
receive.c
diff --git
a/src/src/receive.c
b/src/src/receive.c
index fab0f00c467eeb2da0030d718a2044b43bb9dfcb..f4b82965918626b1b05bff7bd3190cb68469940b 100644
(file)
--- a/
src/src/receive.c
+++ b/
src/src/receive.c
@@
-624,12
+624,8
@@
if (!receive_timeout && !receive_hasc())
if (t.tv_sec > 30*60)
mainlog_close();
else
if (t.tv_sec > 30*60)
mainlog_close();
else
- {
- fd_set r;
- FD_ZERO(&r); FD_SET(0, &r);
- t.tv_sec = 30*60 - t.tv_sec; t.tv_usec = 0;
- if (select(1, &r, NULL, NULL, &t) == 0) mainlog_close();
- }
+ if (poll_one_fd(0, POLLIN, (30*60 - t.tv_sec) * 1000) == 0)
+ mainlog_close();
}
}
}
}
@@
-4216,7
+4212,7
@@
f.receive_call_bombout = TRUE;
/* Before sending an SMTP response in a TCP/IP session, we check to see if the
connection has gone away. This can only be done if there is no unconsumed input
waiting in the local input buffer. We can test for this by calling
/* Before sending an SMTP response in a TCP/IP session, we check to see if the
connection has gone away. This can only be done if there is no unconsumed input
waiting in the local input buffer. We can test for this by calling
-receive_
smtp_buffered
(). RFC 2920 (pipelining) explicitly allows for additional
+receive_
hasc
(). RFC 2920 (pipelining) explicitly allows for additional
input to be sent following the final dot, so the presence of following input is
not an error.
input to be sent following the final dot, so the presence of following input is
not an error.
@@
-4231,15
+4227,10
@@
Of course, since TCP/IP is asynchronous, there is always a chance that the
connection will vanish between the time of this test and the sending of the
response, but the chance of this happening should be small. */
connection will vanish between the time of this test and the sending of the
response, but the chance of this happening should be small. */
-if (
smtp_input && sender_host_address && !f.sender_host_notsocket &&
-
!receive_smtp_buffered
())
+if (
smtp_input && sender_host_address && !f.sender_host_notsocket
+
&& !receive_hasc
())
{
{
- struct timeval tv = {.tv_sec = 0, .tv_usec = 0};
- fd_set select_check;
- FD_ZERO(&select_check);
- FD_SET(fileno(smtp_in), &select_check);
-
- if (select(fileno(smtp_in) + 1, &select_check, NULL, NULL, &tv) != 0)
+ if (poll_one_fd(fileno(smtp_in), POLLIN, 0) != 0)
{
int c = (receive_getc)(GETC_BUFFER_UNLIMITED);
if (c != EOF) (receive_ungetc)(c); else
{
int c = (receive_getc)(GETC_BUFFER_UNLIMITED);
if (c != EOF) (receive_ungetc)(c); else
@@
-4418,12
+4409,12
@@
if (smtp_input)
the socket. */
smtp_printf("250- %u byte chunk, total %d\r\n250 OK id=%s\r\n",
the socket. */
smtp_printf("250- %u byte chunk, total %d\r\n250 OK id=%s\r\n",
- receive_
smtp_buffered
(),
+ receive_
hasc
(),
chunking_datasize, message_size+message_linecount, message_id);
chunking_state = CHUNKING_OFFERED;
}
else
chunking_datasize, message_size+message_linecount, message_id);
chunking_state = CHUNKING_OFFERED;
}
else
- smtp_printf("250 OK id=%s\r\n", receive_
smtp_buffered
(), message_id);
+ smtp_printf("250 OK id=%s\r\n", receive_
hasc
(), message_id);
if (host_checking)
fprintf(stdout,
if (host_checking)
fprintf(stdout,