summaryrefslogtreecommitdiffstats
path: root/lib/vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/vty.c')
-rw-r--r--lib/vty.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 225a82c2d..a68c5d0bc 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -2618,23 +2618,26 @@ vty_event (enum event event, int sock, struct vty *vty)
switch (event)
{
case VTY_SERV:
- vty_serv_thread = thread_add_read (vty_master, vty_accept, vty, sock);
+ vty_serv_thread = thread_add_read(vty_master, vty_accept, vty, sock,
+ NULL);
vector_set_index (Vvty_serv_thread, sock, vty_serv_thread);
break;
#ifdef VTYSH
case VTYSH_SERV:
- vty_serv_thread = thread_add_read (vty_master, vtysh_accept, vty, sock);
+ vty_serv_thread = thread_add_read(vty_master, vtysh_accept, vty, sock,
+ NULL);
vector_set_index (Vvty_serv_thread, sock, vty_serv_thread);
break;
case VTYSH_READ:
- vty->t_read = thread_add_read (vty_master, vtysh_read, vty, sock);
+ vty->t_read = thread_add_read(vty_master, vtysh_read, vty, sock, NULL);
break;
case VTYSH_WRITE:
- vty->t_write = thread_add_write (vty_master, vtysh_write, vty, sock);
+ vty->t_write = thread_add_write(vty_master, vtysh_write, vty, sock,
+ NULL);
break;
#endif /* VTYSH */
case VTY_READ:
- vty->t_read = thread_add_read (vty_master, vty_read, vty, sock);
+ vty->t_read = thread_add_read(vty_master, vty_read, vty, sock, NULL);
/* Time out treatment. */
if (vty->v_timeout)
@@ -2642,12 +2645,12 @@ vty_event (enum event event, int sock, struct vty *vty)
if (vty->t_timeout)
thread_cancel (vty->t_timeout);
vty->t_timeout =
- thread_add_timer (vty_master, vty_timeout, vty, vty->v_timeout);
+ thread_add_timer(vty_master, vty_timeout, vty, vty->v_timeout,
+ NULL);
}
break;
case VTY_WRITE:
- if (! vty->t_write)
- vty->t_write = thread_add_write (vty_master, vty_flush, vty, sock);
+ thread_add_write(vty_master, vty_flush, vty, sock, &vty->t_write);
break;
case VTY_TIMEOUT_RESET:
if (vty->t_timeout)
@@ -2658,7 +2661,8 @@ vty_event (enum event event, int sock, struct vty *vty)
if (vty->v_timeout)
{
vty->t_timeout =
- thread_add_timer (vty_master, vty_timeout, vty, vty->v_timeout);
+ thread_add_timer(vty_master, vty_timeout, vty, vty->v_timeout,
+ NULL);
}
break;
}