]> git.puffer.fish Git - matthieu/frr.git/commitdiff
vtysh: remove duplicate nonblocking handling
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 16 Oct 2024 10:46:35 +0000 (12:46 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 16 Oct 2024 11:30:25 +0000 (13:30 +0200)
non-blocking retries are already handled in `vtysh_client_receive()`.
And by the point we're back in `vtysh_client_run()`, errno may have been
overwritten by the close() call in vtysh_client_receive().

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
vtysh/vtysh.c

index 2d80feef6c970696c00b8b6443f604651674c645..b452618ce0d72a1f35e454e8a26246862b7f5573 100644 (file)
@@ -280,9 +280,6 @@ static int vtysh_client_run(struct vtysh_client *vclient, const char *line,
                nread = vtysh_client_receive(
                        vclient, bufvalid, buf + bufsz - bufvalid - 1, pass_fd);
 
-               if (nread < 0 && (errno == EINTR || errno == EAGAIN))
-                       continue;
-
                if (nread <= 0) {
                        if (vty->of)
                                vty_out(vty,