diff options
Diffstat (limited to 'lib9p/srv.c')
-rw-r--r-- | lib9p/srv.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib9p/srv.c b/lib9p/srv.c index 610debf..1f62e27 100644 --- a/lib9p/srv.c +++ b/lib9p/srv.c @@ -72,7 +72,7 @@ struct _srv_sess { struct _lib9p_srv_req { /* immutable */ - struct _srv_sess *parent_sess; + struct _srv_sess *parent_sess; uint16_t tag; /* mutable */ uint8_t *net_bytes; /* CONFIG_9P_MAX_MSG_SIZE-sized */ @@ -288,7 +288,7 @@ COROUTINE lib9p_srv_write_cr(void *_srv) { handle_message(&req); /* Release resources. ****************************************/ - if (_lib9p_srv_flushch_can_send(&req.ctx._flushch)) + while (_lib9p_srv_flushch_can_send(&req.ctx._flushch)) _lib9p_srv_flushch_send(&req.ctx._flushch, false); reqmap_del(&req.parent_sess->reqs, req.tag); if (req.parent_sess->closing && !req.parent_sess->reqs.len) @@ -597,8 +597,9 @@ static void handle_Tflush(struct _lib9p_srv_req *ctx, struct lib9p_msg_Rflush *resp) { handler_common(ctx, req, resp); - lib9p_error(&ctx->ctx.basectx, - LINUX_EOPNOTSUPP, "flush not yet implemented"); + struct _lib9p_srv_req **oldreqp = reqmap_load(&ctx->parent_sess->reqs, req->oldtag); + if (oldreqp) + _lib9p_srv_flushch_recv(&((*oldreqp)->ctx._flushch)); } static void handle_Twalk(struct _lib9p_srv_req *ctx, |