Commit a21c4156 authored by Mark Andrews's avatar Mark Andrews
Browse files

4219. [bug] Set event->result to ISC_R_WOULDBLOCK on EWOULDBLOCK,

                        EGAIN when these soft error are not retried for
                        isc_socket_send*().
parent 09d72af3
4219. [bug] Set event->result to ISC_R_WOULDBLOCK on EWOULDBLOCK,
EGAIN when these soft error are not retried for
isc_socket_send*().
4218. [bug] Potential null pointer dereference on out of memory
if mmap is not supported. [RT #40777]
......
......@@ -89,9 +89,10 @@
#define ISC_R_BADBASE32 60 /*%< bad base32 encoding */
#define ISC_R_UNSET 61 /*%< unset */
#define ISC_R_MULTIPLE 62 /*%< multiple */
#define ISC_R_WOULDBLOCK 63 /*%< would block */
/*% Not a result code: the number of results. */
#define ISC_R_NRESULTS 63
#define ISC_R_NRESULTS 64
ISC_LANG_BEGINDECLS
......
......@@ -104,6 +104,7 @@ static const char *description[ISC_R_NRESULTS] = {
"bad base32 encoding", /*%< 60 */
"unset", /*%< 61 */
"multiple", /*%< 62 */
"would block", /*%< 63 */
};
static const char *identifier[ISC_R_NRESULTS] = {
......@@ -170,6 +171,7 @@ static const char *identifier[ISC_R_NRESULTS] = {
"ISC_R_BADBASE32",
"ISC_R_UNSET",
"ISC_R_MULTIPLE",
"ISC_R_WOULDBLOCK",
};
#define ISC_RESULT_RESULTSET 2
......
......@@ -2054,8 +2054,11 @@ doio_send(isc__socket_t *sock, isc_socketevent_t *dev) {
if (send_errno == EINTR && ++attempts < NRETRIES)
goto resend;
if (SOFT_ERROR(send_errno))
if (SOFT_ERROR(send_errno)) {
if (errno == EWOULDBLOCK || errno == EAGAIN)
dev->result = ISC_R_WOULDBLOCK;
return (DOIO_SOFT);
}
#define SOFT_OR_HARD(_system, _isc) \
if (send_errno == _system) { \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment