From e7dd2421cfaf6dd75b316c011e4b10843d2007a6 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 30 Sep 2021 18:56:26 +0100 Subject: [PATCH] Pageant: actually link requests on to their queues. When I create any class that implements PageantAsyncOp, I had intended to link its pao.cr list node on to the list in the appropriate PageantClientInfo, so that if that PageantClientInfo was destroyed prematurely (e.g. an agent connection was abruptly closed), we could destroy all the pending requests containing a pointer to it. I did this linking by setting the linked-list fields in pao.cr to point to the appropriate places in the existing list - but I didn't modify the pointer fields _in_ the existing list to point to the new operation at all. So nothing ever actually got linked on to any of those queues! --- pageant.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pageant.c b/pageant.c index fb0f86e1..89256b53 100644 --- a/pageant.c +++ b/pageant.c @@ -836,6 +836,7 @@ static PageantAsyncOp *pageant_make_op( so->pao.info = pc->info; so->pao.cr.prev = pc->info->head.prev; so->pao.cr.next = &pc->info->head; + so->pao.cr.prev->next = so->pao.cr.next->prev = &so->pao.cr; so->pao.reqid = reqid; so->pk = pk; so->pkr.prev = so->pkr.next = NULL; @@ -1353,6 +1354,7 @@ static PageantAsyncOp *pageant_make_op( io->pao.info = pc->info; io->pao.cr.prev = pc->info->head.prev; io->pao.cr.next = &pc->info->head; + io->pao.cr.prev->next = io->pao.cr.next->prev = &io->pao.cr; io->pao.reqid = reqid; io->response = sb; io->crLine = 0;