diff options
author | Martin Mares <mj@ucw.cz> | 1999-11-17 12:00:21 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1999-11-17 12:00:21 +0000 |
commit | ffb59d243a350ed525850e864b38af0ecb0ffea5 (patch) | |
tree | c3fe6231d5cd814afc901bcf992c0967014e09fc /nest | |
parent | ea9bb932a31e5df14e3a1a5f580e62b6aedc0247 (diff) |
Command line interface now works.
Diffstat (limited to 'nest')
-rw-r--r-- | nest/cli.c | 3 | ||||
-rw-r--r-- | nest/cli.h | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -171,6 +171,7 @@ cli_new(void *priv) c->event->data = c; c->tx_buf = c->tx_pos = c->tx_write = NULL; c->cont = cli_hello; + c->cleanup = NULL; c->last_reply = 0; c->parser_pool = lp_new(c->pool, 4096); ev_schedule(c->event); @@ -194,6 +195,8 @@ cli_written(cli *c) void cli_free(cli *c) { + if (c->cleanup) + c->cleanup(c); rfree(c->pool); } @@ -29,6 +29,7 @@ typedef struct cli { struct cli_out *tx_buf, *tx_pos, *tx_write; event *event; void (*cont)(struct cli *c); + void (*cleanup)(struct cli *c); void *rover; /* Private to continuation routine */ int last_reply; struct linpool *parser_pool; /* Pool used during parsing */ |