diff --git a/bin/tests/tasks/t_tasks.c b/bin/tests/tasks/t_tasks.c index f6d67d36ae..422b5cc314 100644 --- a/bin/tests/tasks/t_tasks.c +++ b/bin/tests/tasks/t_tasks.c @@ -88,6 +88,13 @@ my_tick(isc_task_t *task, isc_event_t *event) { * Adapted from RTH's original task_test program */ +static char one[] = "1"; +static char two[] = "2"; +static char three[] = "3"; +static char four[] = "4"; +static char tick[] = "tick"; +static char tock[] = "tock"; + static int t_tasks1(void) { char *p; @@ -158,25 +165,25 @@ t_tasks1(void) { return(T_FAIL); } - isc_result = isc_task_onshutdown(task1, t1_shutdown, "1"); + isc_result = isc_task_onshutdown(task1, t1_shutdown, one); if (isc_result != ISC_R_SUCCESS) { t_info("isc_task_onshutdown failed %d\n", isc_result); return(T_FAIL); } - isc_result = isc_task_onshutdown(task2, t1_shutdown, "2"); + isc_result = isc_task_onshutdown(task2, t1_shutdown, two); if (isc_result != ISC_R_SUCCESS) { t_info("isc_task_onshutdown failed %d\n", isc_result); return(T_FAIL); } - isc_result = isc_task_onshutdown(task3, t1_shutdown, "3"); + isc_result = isc_task_onshutdown(task3, t1_shutdown, three); if (isc_result != ISC_R_SUCCESS) { t_info("isc_task_onshutdown failed %d\n", isc_result); return(T_FAIL); } - isc_result = isc_task_onshutdown(task4, t1_shutdown, "4"); + isc_result = isc_task_onshutdown(task4, t1_shutdown, four); if (isc_result != ISC_R_SUCCESS) { t_info("isc_task_onshutdown failed %d\n", isc_result); return(T_FAIL); @@ -194,7 +201,7 @@ t_tasks1(void) { isc_interval_set(&interval, 1, 0); isc_result = isc_timer_create(timgr, isc_timertype_ticker, &absolute, &interval, - task1, my_tick, "tick", &ti1); + task1, my_tick, tick, &ti1); if (isc_result != ISC_R_SUCCESS) { t_info("isc_timer_create %d\n", isc_result); return(T_UNRESOLVED); @@ -205,7 +212,7 @@ t_tasks1(void) { isc_interval_set(&interval, 1, 0); isc_result = isc_timer_create(timgr, isc_timertype_ticker, &absolute, &interval, - task2, my_tick, "tock", &ti2); + task2, my_tick, tock, &ti2); if (isc_result != ISC_R_SUCCESS) { t_info("isc_timer_create %d\n", isc_result); return(T_UNRESOLVED); @@ -226,7 +233,7 @@ t_tasks1(void) { * structure (socket, timer, task, etc) but this is just a test * program. */ - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "1", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, one, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -235,7 +242,7 @@ t_tasks1(void) { isc_task_send(task1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "1", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, one, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -244,7 +251,7 @@ t_tasks1(void) { isc_task_send(task1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "1", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, one, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -253,7 +260,7 @@ t_tasks1(void) { isc_task_send(task1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "1", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, one, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -262,7 +269,7 @@ t_tasks1(void) { isc_task_send(task1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "1", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, one, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -271,7 +278,7 @@ t_tasks1(void) { isc_task_send(task1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "1", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, one, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -280,7 +287,7 @@ t_tasks1(void) { isc_task_send(task1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "1", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, one, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -289,7 +296,7 @@ t_tasks1(void) { isc_task_send(task1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "1", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, one, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -298,7 +305,7 @@ t_tasks1(void) { isc_task_send(task1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "1", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, one, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -307,7 +314,7 @@ t_tasks1(void) { isc_task_send(task1, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "2", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, two, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -316,7 +323,7 @@ t_tasks1(void) { isc_task_send(task2, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "3", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, three, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -325,7 +332,7 @@ t_tasks1(void) { isc_task_send(task3, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "4", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, four, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -334,7 +341,7 @@ t_tasks1(void) { isc_task_send(task4, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "2", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, two, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -343,7 +350,7 @@ t_tasks1(void) { isc_task_send(task2, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "3", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, three, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); @@ -352,7 +359,7 @@ t_tasks1(void) { isc_task_send(task3, &event); - event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, "4", + event = isc_event_allocate(mctx, (void *)1, 1, t1_callback, four, sizeof(*event)); if (event == NULL) { t_info("isc_event_allocate failed\n"); diff --git a/lib/isc/include/isc/socket.h b/lib/isc/include/isc/socket.h index 9f2916ceb8..2d2285b7c8 100644 --- a/lib/isc/include/isc/socket.h +++ b/lib/isc/include/isc/socket.h @@ -347,7 +347,7 @@ typedef struct isc_socketmethods { unsigned int options); isc_result_t (*sendto)(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, isc_taskaction_t action, - const void *arg, isc_sockaddr_t *address, + void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo); isc_result_t (*sendto2)(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, isc_sockaddr_t *address, @@ -356,10 +356,10 @@ typedef struct isc_socketmethods { unsigned int flags); isc_result_t (*connect)(isc_socket_t *sock, isc_sockaddr_t *addr, isc_task_t *task, isc_taskaction_t action, - const void *arg); + void *arg); isc_result_t (*recv)(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, isc_task_t *task, - isc_taskaction_t action, const void *arg); + isc_taskaction_t action, void *arg); isc_result_t (*recv2)(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, isc_task_t *task, isc_socketevent_t *event, unsigned int flags); @@ -742,7 +742,7 @@ isc_socket_listen(isc_socket_t *sock, unsigned int backlog); isc_result_t isc_socket_accept(isc_socket_t *sock, - isc_task_t *task, isc_taskaction_t action, const void *arg); + isc_task_t *task, isc_taskaction_t action, void *arg); /*%< * Queue accept event. When a new connection is received, the task will * get an ISC_SOCKEVENT_NEWCONN event with the sender set to the listen @@ -766,7 +766,7 @@ isc_socket_accept(isc_socket_t *sock, isc_result_t isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addressp, isc_task_t *task, isc_taskaction_t action, - const void *arg); + void *arg); /*%< * Connect 'socket' to peer with address *saddr. When the connection * succeeds, or when an error occurs, a CONNECT event with action 'action' @@ -833,11 +833,11 @@ isc_socket_getsockname(isc_socket_t *sock, isc_sockaddr_t *addressp); isc_result_t isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, - isc_task_t *task, isc_taskaction_t action, const void *arg); + isc_task_t *task, isc_taskaction_t action, void *arg); isc_result_t isc_socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist, unsigned int minimum, - isc_task_t *task, isc_taskaction_t action, const void *arg); + isc_task_t *task, isc_taskaction_t action, void *arg); isc_result_t isc_socket_recv2(isc_socket_t *sock, isc_region_t *region, @@ -920,21 +920,21 @@ isc_socket_recv2(isc_socket_t *sock, isc_region_t *region, /*@{*/ isc_result_t isc_socket_send(isc_socket_t *sock, isc_region_t *region, - isc_task_t *task, isc_taskaction_t action, const void *arg); + isc_task_t *task, isc_taskaction_t action, void *arg); isc_result_t isc_socket_sendto(isc_socket_t *sock, isc_region_t *region, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo); isc_result_t isc_socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg); + isc_task_t *task, isc_taskaction_t action, void *arg); isc_result_t isc_socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo); isc_result_t isc_socket_sendtov2(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo, unsigned int flags); isc_result_t @@ -1154,7 +1154,7 @@ isc_socket_dscp(isc_socket_t *sock, isc_dscp_t dscp); isc_socketevent_t * isc_socket_socketevent(isc_mem_t *mctx, void *sender, isc_eventtype_t eventtype, isc_taskaction_t action, - const void *arg); + void *arg); /*%< * Get a isc_socketevent_t to be used with isc_socket_sendto2(), etc. */ diff --git a/lib/isc/include/isc/task.h b/lib/isc/include/isc/task.h index 2293237b28..1127547b84 100644 --- a/lib/isc/include/isc/task.h +++ b/lib/isc/include/isc/task.h @@ -129,7 +129,7 @@ typedef struct isc_taskmethods { unsigned int (*unsend)(isc_task_t *task, void *sender, isc_eventtype_t type, void *tag, isc_eventlist_t *events); isc_result_t (*onshutdown)(isc_task_t *task, isc_taskaction_t action, - const void *arg); + void *arg); void (*shutdown)(isc_task_t *task); void (*setname)(isc_task_t *task, const char *name, void *tag); unsigned int (*purgeevents)(isc_task_t *task, void *sender, @@ -442,7 +442,7 @@ isc_task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type, isc_result_t isc_task_onshutdown(isc_task_t *task, isc_taskaction_t action, - const void *arg); + void *arg); /*%< * Send a shutdown event with action 'action' and argument 'arg' when * 'task' is shutdown. diff --git a/lib/isc/socket_api.c b/lib/isc/socket_api.c index 546937560c..6691f2211a 100644 --- a/lib/isc/socket_api.c +++ b/lib/isc/socket_api.c @@ -149,7 +149,7 @@ isc_socket_bind(isc_socket_t *sock, isc_sockaddr_t *sockaddr, isc_result_t isc_socket_sendto(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, - isc_taskaction_t action, const void *arg, + isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo) { REQUIRE(ISCAPI_SOCKET_VALID(sock)); @@ -164,7 +164,7 @@ isc_socket_sendto(isc_socket_t *sock, isc_region_t *region, isc_task_t *task, isc_result_t isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, isc_task_t *task, - isc_taskaction_t action, const void *arg) + isc_taskaction_t action, void *arg) { REQUIRE(ISCAPI_SOCKET_VALID(sock)); @@ -176,7 +176,7 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, isc_task_t *task, isc_result_t isc_socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { REQUIRE(ISCAPI_SOCKET_VALID(sock)); @@ -312,7 +312,7 @@ isc_socketmgr_create2(isc_mem_t *mctx, isc_socketmgr_t **managerp, isc_result_t isc_socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist, unsigned int minimum, isc_task_t *task, - isc_taskaction_t action, const void *arg) + isc_taskaction_t action, void *arg) { return (isc__socket_recvv(sock, buflist, minimum, task, action, arg)); } @@ -327,21 +327,21 @@ isc_socket_recv2(isc_socket_t *sock, isc_region_t *region, isc_result_t isc_socket_send(isc_socket_t *sock, isc_region_t *region, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { return (isc__socket_send(sock, region, task, action, arg)); } isc_result_t isc_socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { return (isc__socket_sendv(sock, buflist, task, action, arg)); } isc_result_t isc_socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo) { return (isc__socket_sendtov(sock, buflist, task, action, arg, @@ -350,7 +350,7 @@ isc_socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, isc_result_t isc_socket_sendtov2(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo, unsigned int flags) { @@ -392,7 +392,7 @@ isc_socket_listen(isc_socket_t *sock, unsigned int backlog) { isc_result_t isc_socket_accept(isc_socket_t *sock, isc_task_t *task, - isc_taskaction_t action, const void *arg) + isc_taskaction_t action, void *arg) { return (isc__socket_accept(sock, task, action, arg)); } diff --git a/lib/isc/task.c b/lib/isc/task.c index 0a4e80a4f0..fff6b884ea 100644 --- a/lib/isc/task.c +++ b/lib/isc/task.c @@ -207,7 +207,7 @@ isc__task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type, void *tag, isc_eventlist_t *events); isc_result_t isc__task_onshutdown(isc_task_t *task0, isc_taskaction_t action, - const void *arg); + void *arg); void isc__task_shutdown(isc_task_t *task0); void @@ -798,7 +798,7 @@ isc__task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type, isc_result_t isc__task_onshutdown(isc_task_t *task0, isc_taskaction_t action, - const void *arg) + void *arg) { isc__task_t *task = (isc__task_t *)task0; isc_boolean_t disallowed = ISC_FALSE; @@ -2163,7 +2163,7 @@ isc_task_unsend(isc_task_t *task, void *sender, isc_eventtype_t type, } isc_result_t -isc_task_onshutdown(isc_task_t *task, isc_taskaction_t action, const void *arg) +isc_task_onshutdown(isc_task_t *task, isc_taskaction_t action, void *arg) { REQUIRE(ISCAPI_TASK_VALID(task)); diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index e111c74a05..0dd5bbce5e 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -503,32 +503,32 @@ isc__socket_detach(isc_socket_t **socketp); isc_result_t isc__socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist, unsigned int minimum, isc_task_t *task, - isc_taskaction_t action, const void *arg); + isc_taskaction_t action, void *arg); isc_result_t isc__socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, isc_task_t *task, - isc_taskaction_t action, const void *arg); + isc_taskaction_t action, void *arg); isc_result_t isc__socket_recv2(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, isc_task_t *task, isc_socketevent_t *event, unsigned int flags); isc_result_t isc__socket_send(isc_socket_t *sock, isc_region_t *region, - isc_task_t *task, isc_taskaction_t action, const void *arg); + isc_task_t *task, isc_taskaction_t action, void *arg); isc_result_t isc__socket_sendto(isc_socket_t *sock, isc_region_t *region, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo); isc_result_t isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg); + isc_task_t *task, isc_taskaction_t action, void *arg); isc_result_t isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo); isc_result_t isc__socket_sendtov2(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo, unsigned int flags); isc_result_t @@ -539,7 +539,7 @@ isc__socket_sendto2(isc_socket_t *sock, isc_region_t *region, isc_socketevent_t * isc_socket_socketevent(isc_mem_t *mctx, void *sender, isc_eventtype_t eventtype, isc_taskaction_t action, - const void *arg); + void *arg); void isc__socket_cleanunix(isc_sockaddr_t *sockaddr, isc_boolean_t active); @@ -555,11 +555,11 @@ isc_result_t isc__socket_listen(isc_socket_t *sock, unsigned int backlog); isc_result_t isc__socket_accept(isc_socket_t *sock, - isc_task_t *task, isc_taskaction_t action, const void *arg); + isc_task_t *task, isc_taskaction_t action, void *arg); isc_result_t isc__socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, isc_task_t *task, isc_taskaction_t action, - const void *arg); + void *arg); isc_result_t isc__socket_getpeername(isc_socket_t *sock, isc_sockaddr_t *addressp); isc_result_t @@ -1770,7 +1770,7 @@ destroy_socketevent(isc_event_t *event) { static isc_socketevent_t * allocate_socketevent(isc_mem_t *mctx, void *sender, isc_eventtype_t eventtype, isc_taskaction_t action, - const void *arg) + void *arg) { isc_socketevent_t *ev; @@ -4829,7 +4829,7 @@ socket_recv(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task, isc_result_t isc__socket_recvv(isc_socket_t *sock0, isc_bufferlist_t *buflist, unsigned int minimum, isc_task_t *task, - isc_taskaction_t action, const void *arg) + isc_taskaction_t action, void *arg) { isc__socket_t *sock = (isc__socket_t *)sock0; isc_socketevent_t *dev; @@ -4884,7 +4884,7 @@ isc__socket_recvv(isc_socket_t *sock0, isc_bufferlist_t *buflist, isc_result_t isc__socket_recv(isc_socket_t *sock0, isc_region_t *region, unsigned int minimum, isc_task_t *task, - isc_taskaction_t action, const void *arg) + isc_taskaction_t action, void *arg) { isc__socket_t *sock = (isc__socket_t *)sock0; isc_socketevent_t *dev; @@ -5030,7 +5030,7 @@ socket_send(isc__socket_t *sock, isc_socketevent_t *dev, isc_task_t *task, isc_result_t isc__socket_send(isc_socket_t *sock, isc_region_t *region, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { /* * REQUIRE() checking is performed in isc_socket_sendto(). @@ -5041,7 +5041,7 @@ isc__socket_send(isc_socket_t *sock, isc_region_t *region, isc_result_t isc__socket_sendto(isc_socket_t *sock0, isc_region_t *region, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo) { isc__socket_t *sock = (isc__socket_t *)sock0; @@ -5070,7 +5070,7 @@ isc__socket_sendto(isc_socket_t *sock0, isc_region_t *region, isc_result_t isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { return (isc__socket_sendtov2(sock, buflist, task, action, arg, NULL, NULL, 0)); @@ -5078,7 +5078,7 @@ isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist, isc_result_t isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo) { return (isc__socket_sendtov2(sock, buflist, task, action, arg, address, @@ -5087,7 +5087,7 @@ isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, isc_result_t isc__socket_sendtov2(isc_socket_t *sock0, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo, unsigned int flags) { @@ -5487,7 +5487,7 @@ isc__socket_listen(isc_socket_t *sock0, unsigned int backlog) { */ isc_result_t isc__socket_accept(isc_socket_t *sock0, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { isc__socket_t *sock = (isc__socket_t *)sock0; isc_socket_newconnev_t *dev; @@ -5562,7 +5562,7 @@ isc__socket_accept(isc_socket_t *sock0, isc_result_t isc__socket_connect(isc_socket_t *sock0, isc_sockaddr_t *addr, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { isc__socket_t *sock = (isc__socket_t *)sock0; isc_socket_connev_t *dev; @@ -6131,7 +6131,7 @@ isc__socket_dscp(isc_socket_t *sock0, isc_dscp_t dscp) { isc_socketevent_t * isc_socket_socketevent(isc_mem_t *mctx, void *sender, isc_eventtype_t eventtype, isc_taskaction_t action, - const void *arg) + void *arg) { return (allocate_socketevent(mctx, sender, eventtype, action, arg)); } diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index aa347bba79..0c694b2b08 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -1071,7 +1071,7 @@ destroy_socketevent(isc_event_t *event) { static isc_socketevent_t * allocate_socketevent(isc_mem_t *mctx, isc_socket_t *sock, isc_eventtype_t eventtype, isc_taskaction_t action, - const void *arg) + void *arg) { isc_socketevent_t *ev; @@ -2833,7 +2833,7 @@ socket_recv(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task, isc_result_t isc__socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist, unsigned int minimum, isc_task_t *task, - isc_taskaction_t action, const void *arg) + isc_taskaction_t action, void *arg) { isc_socketevent_t *dev; isc_socketmgr_t *manager; @@ -2904,7 +2904,7 @@ isc__socket_recvv(isc_socket_t *sock, isc_bufferlist_t *buflist, isc_result_t isc__socket_recv(isc_socket_t *sock, isc_region_t *region, unsigned int minimum, isc_task_t *task, - isc_taskaction_t action, const void *arg) + isc_taskaction_t action, void *arg) { isc_socketevent_t *dev; isc_socketmgr_t *manager; @@ -3053,7 +3053,7 @@ socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task, isc_result_t isc__socket_send(isc_socket_t *sock, isc_region_t *region, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { /* * REQUIRE() checking is performed in isc_socket_sendto(). @@ -3064,7 +3064,7 @@ isc__socket_send(isc_socket_t *sock, isc_region_t *region, isc_result_t isc__socket_sendto(isc_socket_t *sock, isc_region_t *region, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo) { isc_socketevent_t *dev; @@ -3108,7 +3108,7 @@ isc__socket_sendto(isc_socket_t *sock, isc_region_t *region, isc_result_t isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { return (isc_socket_sendtov2(sock, buflist, task, action, arg, NULL, NULL, 0)); @@ -3116,7 +3116,7 @@ isc__socket_sendv(isc_socket_t *sock, isc_bufferlist_t *buflist, isc_result_t isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo) { return (isc_socket_sendtov2(sock, buflist, task, action, arg, address, @@ -3125,7 +3125,7 @@ isc__socket_sendtov(isc_socket_t *sock, isc_bufferlist_t *buflist, isc_result_t isc__socket_sendtov2(isc_socket_t *sock, isc_bufferlist_t *buflist, - isc_task_t *task, isc_taskaction_t action, const void *arg, + isc_task_t *task, isc_taskaction_t action, void *arg, isc_sockaddr_t *address, struct in6_pktinfo *pktinfo, unsigned int flags) { @@ -3348,7 +3348,7 @@ isc__socket_listen(isc_socket_t *sock, unsigned int backlog) { */ isc_result_t isc__socket_accept(isc_socket_t *sock, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { isc_socket_newconnev_t *adev; isc_socketmgr_t *manager; @@ -3466,7 +3466,7 @@ isc__socket_accept(isc_socket_t *sock, isc_result_t isc__socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr, - isc_task_t *task, isc_taskaction_t action, const void *arg) + isc_task_t *task, isc_taskaction_t action, void *arg) { char strbuf[ISC_STRERRORSIZE]; isc_socket_connev_t *cdev; @@ -3936,7 +3936,7 @@ isc___socketmgr_maxudp(isc_socketmgr_t *manager, int maxudp) { isc_socketevent_t * isc_socket_socketevent(isc_mem_t *mctx, void *sender, isc_eventtype_t eventtype, isc_taskaction_t action, - const void *arg) + void *arg) { return (allocate_socketevent(mctx, sender, eventtype, action, arg)); }