mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-10 18:16:22 +00:00
lib: let vty.c manage its own pointers
vty.c doesn't require back refs for a couple threads Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
parent
56a94b3668
commit
d818259863
12
lib/vty.c
12
lib/vty.c
@ -2633,18 +2633,18 @@ static struct thread_master *vty_master;
|
|||||||
static void
|
static void
|
||||||
vty_event (enum event event, int sock, struct vty *vty)
|
vty_event (enum event event, int sock, struct vty *vty)
|
||||||
{
|
{
|
||||||
|
struct thread *vty_serv_thread = NULL;
|
||||||
|
|
||||||
switch (event)
|
switch (event)
|
||||||
{
|
{
|
||||||
case VTY_SERV:
|
case VTY_SERV:
|
||||||
vector_set_index (Vvty_serv_thread, sock, NULL);
|
vty_serv_thread = thread_add_read(vty_master, vty_accept, vty, sock, NULL);
|
||||||
thread_add_read(vty_master, vty_accept, vty, sock,
|
vector_set_index (Vvty_serv_thread, sock, vty_serv_thread);
|
||||||
(struct thread **) &Vvty_serv_thread->index[sock]);
|
|
||||||
break;
|
break;
|
||||||
#ifdef VTYSH
|
#ifdef VTYSH
|
||||||
case VTYSH_SERV:
|
case VTYSH_SERV:
|
||||||
vector_set_index (Vvty_serv_thread, sock, NULL);
|
vty_serv_thread = thread_add_read(vty_master, vtysh_accept, vty, sock, NULL);
|
||||||
thread_add_read(vty_master, vtysh_accept, vty, sock,
|
vector_set_index (Vvty_serv_thread, sock, vty_serv_thread);
|
||||||
(struct thread **) &Vvty_serv_thread->index[sock]);
|
|
||||||
break;
|
break;
|
||||||
case VTYSH_READ:
|
case VTYSH_READ:
|
||||||
vty->t_read = NULL;
|
vty->t_read = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user