}
if (atomic_load_acquire(&listener->controls->shuttingdown) ||
- result == ISC_R_CANCELED)
+ result == ISC_R_SHUTTINGDOWN)
{
goto cleanup_sendhandle;
} else if (result != ISC_R_SUCCESS) {
}
if (result != ISC_R_SUCCESS) {
- if (result == ISC_R_SHUTTINGDOWN || result == ISC_R_CANCELED) {
+ if (result == ISC_R_SHUTTINGDOWN) {
atomic_store_release(&listener->controls->shuttingdown,
true);
} else if (result != ISC_R_EOF) {
isc_sockaddr_t peeraddr;
if (result != ISC_R_SUCCESS) {
- if (result == ISC_R_CANCELED) {
+ if (result == ISC_R_SHUTTINGDOWN) {
shutdown_listener(listener);
}
return (result);
INSIST(VALID_CCMSG(ccmsg));
- if (eresult == ISC_R_CANCELED || eresult == ISC_R_EOF) {
+ switch (eresult) {
+ case ISC_R_SHUTTINGDOWN:
+ case ISC_R_CANCELED:
+ case ISC_R_EOF:
ccmsg->result = eresult;
goto done;
- } else if (region == NULL && eresult == ISC_R_SUCCESS) {
- ccmsg->result = ISC_R_EOF;
- goto done;
- } else if (eresult != ISC_R_SUCCESS) {
+ case ISC_R_SUCCESS:
+ if (region == NULL) {
+ ccmsg->result = ISC_R_EOF;
+ goto done;
+ }
+ ccmsg->result = ISC_R_SUCCESS;
+ break;
+ default:
ccmsg->result = eresult;
goto done;
- } else {
- ccmsg->result = eresult;
}
if (!ccmsg->length_received) {