Use a tailq of write buffers instead of a single one per connection.

This allows us to queue up multiple messages for writing like the
sudoers client supports.  Currently, each connection has its own
free list.  In the future we may want a single free list with low
and high water marks.
This commit is contained in:
Todd C. Miller
2021-04-06 14:30:16 -06:00
parent e3ff4e663c
commit 7bb5eef9d9
3 changed files with 76 additions and 28 deletions

View File

@@ -61,7 +61,8 @@ struct connection_closure {
struct eventlog *evlog;
struct timespec elapsed_time;
struct connection_buffer read_buf;
struct connection_buffer write_buf;
struct connection_buffer_list write_bufs;
struct connection_buffer_list free_bufs;
struct sudo_event_base *evbase;
struct sudo_event *commit_ev;
struct sudo_event *read_ev;