Skip to content

Commit

Permalink
basic tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
dormando committed Jan 13, 2025
1 parent 44e39be commit 32bff75
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions proxy_luafgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static void mcp_rcontext_cleanup(lua_State *L, mcp_funcgen_t *fgen, mcp_rcontext
// cleanup of request queue entries. recurse funcgen cleanup.
for (int x = 0; x < fgen->max_queues; x++) {
struct mcp_rqueue_s *rqu = &rctx->qslots[x];
if (rqu->obj_type == RQUEUE_TYPE_POOL) {
if (rqu->obj_type == RQUEUE_TYPE_POOL || rqu->obj_type == RQUEUE_TYPE_INT) {
// nothing to do.
} else if (rqu->obj_type == RQUEUE_TYPE_FGEN) {
// don't need to recurse, just free the subrctx.
Expand Down Expand Up @@ -1168,15 +1168,12 @@ void mcp_run_rcontext_handle(mcp_rcontext_t *rctx, int handle) {
} else if (resp->io_pending) {
resp->io_pending->return_cb = proxy_return_rqu_cb;
// Add io object to extstore submission queue.
io_queue_t *q = conn_io_queue_get(rctx->c, IO_QUEUE_EXTSTORE);
io_queue_t *q = thread_io_queue_get(rctx->fgen->thread, IO_QUEUE_EXTSTORE);
io_pending_proxy_t *io = (io_pending_proxy_t *)resp->io_pending;
io->queue_handle = handle;
io->client_resp = rqu->res_obj;

io->eio.next = q->stack_ctx;
q->stack_ctx = &io->eio;
assert(q->count >= 0);
q->count++;
STAILQ_INSERT_TAIL(&q->stack, (io_pending_t *)io, iop_next);

io->rctx = rctx;
io->c = rctx->c;
Expand Down

0 comments on commit 32bff75

Please sign in to comment.