diff options
author | Maria Matejka <mq@ucw.cz> | 2023-01-19 10:53:09 +0100 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2023-01-19 11:03:31 +0100 |
commit | 59a5bf18f997e11a3e3ddd70d59f597f77fa2b6c (patch) | |
tree | f0a4640ffb2f812a872a44fd512e7ba981fd09c2 /nest/cli.h | |
parent | 34aeafbf9ea98c8644f6403b3810ff0490350465 (diff) |
CLI closing fix when its action is run asynchronously.
Some CLI actions, notably "show route", are run by queuing an event
somewhere else. If the user closes the socket, in case such an action is
being executed, the CLI must free the socket immediately from the error
hook but the pool must remain until the asynchronous event finishes and
cleans everything up.
Diffstat (limited to 'nest/cli.h')
-rw-r--r-- | nest/cli.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -28,7 +28,7 @@ struct cli_out { typedef struct cli { node n; /* Node in list of all log hooks */ pool *pool; - void *priv; /* Private to sysdep layer */ + struct birdsock *sock; /* Underlying socket */ byte *rx_buf, *rx_pos, *rx_aux; /* sysdep */ struct cli_out *tx_buf, *tx_pos, *tx_write; event *event; @@ -63,7 +63,7 @@ static inline void cli_separator(cli *c) /* Functions provided to sysdep layer */ -cli *cli_new(void *); +cli *cli_new(struct birdsock *); void cli_init(void); void cli_free(cli *); void cli_kick(cli *); |