diff options
author | Mark Stapp <mjs@voltanet.io> | 2021-10-22 15:59:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 15:59:54 +0200 |
commit | 036b746570da1b7317e965631534d13e1b515e75 (patch) | |
tree | 984cfe9108d427872b9ef1e70cddd55a8a6cd1a5 /lib/vty.c | |
parent | Merge pull request #9866 from ewlumpkin/comment_spelling_fixes (diff) | |
parent | lib: change thread_add_* API (diff) | |
download | frr-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.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -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: |