]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add isc_task_getnetmgr() function
authorOndřej Surý <ondrej@isc.org>
Thu, 27 May 2021 07:45:07 +0000 (09:45 +0200)
committerOndřej Surý <ondrej@sury.org>
Mon, 31 May 2021 12:52:05 +0000 (14:52 +0200)
Add a function to pull the attached netmgr from inside the executed
task.  This is needed for any task that needs to call the netmgr API.

lib/isc/include/isc/task.h
lib/isc/task.c
lib/isc/win32/libisc.def.in

index f1facae39739d7e750b0186a9af11f2a5415c317..fc33330267dba34bee986332576a52ddcd67614c 100644 (file)
@@ -511,6 +511,9 @@ isc_task_getname(isc_task_t *task);
  *
  */
 
+isc_nm_t *
+isc_task_getnetmgr(isc_task_t *task);
+
 void *
 isc_task_gettag(isc_task_t *task);
 /*%<
index c85ac761974c888323bcc303da17c48d218a9353..e93c5d58563ebbf45d0f7161bb9bd1b6c8e620d2 100644 (file)
@@ -774,6 +774,13 @@ isc_task_gettag(isc_task_t *task) {
        return (task->tag);
 }
 
+isc_nm_t *
+isc_task_getnetmgr(isc_task_t *task) {
+       REQUIRE(VALID_TASK(task));
+
+       return (task->manager->netmgr);
+}
+
 /***
  *** Task Manager.
  ***/
index 664ff6c065d495dbc01060e04f0a414a064c1da4..743d2cf6b83936f3bc719fc735a4f7c892fb8d1b 100644 (file)
@@ -100,6 +100,7 @@ isc_socketmgr_getmaxsockets
 isc_socketmgr_setreserved
 isc_socketmgr_setstats
 isc_task_getname
+isc_task_getnetmgr
 isc_task_gettag
 isc_task_ready
 isc_task_run