2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-01 15:05:23 +00:00

1845. [bug] Improve error reporting to distingish between

accept()/fcntl() and socket()/fcntl() errors.
                        [RT #13745]
This commit is contained in:
Mark Andrews
2005-05-19 02:42:42 +00:00
parent 092f767930
commit d73541ea2e
3 changed files with 38 additions and 32 deletions

View File

@@ -39,7 +39,9 @@
1846. [contrib] query-loc-0.3.0 from Stephane Bortzmeyer
<bortzmeyer@nic.fr>.
1845. [placeholder] rt13745
1845. [bug] Improve error reporting to distingish between
accept()/fcntl() and socket()/fcntl() errors.
[RT #13745]
1844. [bug] inet_pton() accepted more that 4 hexadecimal digits
for each 16 bit piece of the IPv6 address. The text

View File

@@ -34,7 +34,7 @@ rt13662 new
rt13694 new
rt13707 new
rt13714 new
rt13745 new
rt13745 closed
rt13753 new
rt13754 new
rt13771 new

View File

@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.249 2005/04/27 04:57:23 sra Exp $ */
/* $Id: socket.c,v 1.250 2005/05/19 02:42:42 marka Exp $ */
/*! \file */
@@ -1358,6 +1358,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
int on = 1;
#endif
char strbuf[ISC_STRERRORSIZE];
const char *err = "socket";
REQUIRE(VALID_MANAGER(manager));
REQUIRE(socketp != NULL && *socketp == NULL);
@@ -1390,6 +1391,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
(void)close(sock->fd);
errno = tmp;
sock->fd = new;
err = "isc_socket_create: fcntl";
}
#endif
@@ -1426,7 +1428,7 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type,
default:
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"socket() %s: %s",
"%s() %s: %s", err,
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_GENERAL,
ISC_MSG_FAILED,
@@ -1778,6 +1780,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
int fd;
isc_result_t result = ISC_R_SUCCESS;
char strbuf[ISC_STRERRORSIZE];
const char *err = "accept";
UNUSED(me);
@@ -1841,6 +1844,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
(void)close(fd);
errno = tmp;
fd = new;
err = "fcntl";
}
#endif
@@ -1870,7 +1874,7 @@ internal_accept(isc_task_t *me, isc_event_t *ev) {
}
isc__strerror(errno, strbuf, sizeof(strbuf));
UNEXPECTED_ERROR(__FILE__, __LINE__,
"internal_accept: accept() %s: %s",
"internal_accept: %s() %s: %s", err,
isc_msgcat_get(isc_msgcat,
ISC_MSGSET_GENERAL,
ISC_MSG_FAILED,