summaryrefslogtreecommitdiffstats
path: root/lib/vty.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2021-10-22 15:59:54 +0200
committerGitHub <noreply@github.com>2021-10-22 15:59:54 +0200
commit036b746570da1b7317e965631534d13e1b515e75 (patch)
tree984cfe9108d427872b9ef1e70cddd55a8a6cd1a5 /lib/vty.c
parentMerge pull request #9866 from ewlumpkin/comment_spelling_fixes (diff)
parentlib: change thread_add_* API (diff)
downloadfrr-036b746570da1b7317e965631534d13e1b515e75.tar.xz
frr-036b746570da1b7317e965631534d13e1b515e75.zip
Merge pull request #9765 from idryzhov/lib-bool-thread-add
lib: change thread_add_* API
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/vty.c b/lib/vty.c
index df26cae54..5a03514be 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2697,19 +2697,21 @@ static struct thread_master *vty_master;
static void vty_event_serv(enum event event, int sock)
{
- struct thread *vty_serv_thread = NULL;
+ struct thread **vty_serv_thread_ptr = NULL;
switch (event) {
case VTY_SERV:
- vty_serv_thread = thread_add_read(vty_master, vty_accept,
- NULL, sock, NULL);
- vector_set_index(Vvty_serv_thread, sock, vty_serv_thread);
+ vty_serv_thread_ptr = (struct thread **)vector_get_index(
+ Vvty_serv_thread, sock);
+ thread_add_read(vty_master, vty_accept, NULL, sock,
+ vty_serv_thread_ptr);
break;
#ifdef VTYSH
case VTYSH_SERV:
- vty_serv_thread = thread_add_read(vty_master, vtysh_accept,
- NULL, sock, NULL);
- vector_set_index(Vvty_serv_thread, sock, vty_serv_thread);
+ vty_serv_thread_ptr = (struct thread **)vector_get_index(
+ Vvty_serv_thread, sock);
+ thread_add_read(vty_master, vtysh_accept, NULL, sock,
+ vty_serv_thread_ptr);
break;
#endif /* VTYSH */
default: