Commit 913f272d authored by Nils Goroll's avatar Nils Goroll

fix the zero-length T_NEXUS

parent cbdc871c
......@@ -919,10 +919,27 @@ ved_task(struct worker *wrk, void *priv)
Lck_Unlock(&pesi_tree->tree->tree_lock);
break;
case T_NEXUS:
// moved to set_delivered
// req_fini(req, wrk);
pesi = NULL;
task_fini(pesi_tree, req->transport_priv);
assert(node->req == req);
/*
* XXX rethink: T_NEXUS' req gets fini't in
* bytes_push_worklist(), but not if it had no nodes below,
* because then there were no nodes unpended. so handle the
* "zero object" case here
*/
if (VSTAILQ_EMPTY(&node->nexus.children)) {
assert(node->state == ST_DELIVERED);
assert(pesi == req->transport_priv);
assert(req == node->req);
req->transport_priv = NULL;
req = NULL;
pesi_destroy(&pesi);
req_fini(&node->req, wrk);
task_fini(pesi_tree, pesi);
} else {
pesi = NULL;
task_fini(pesi_tree, req->transport_priv);
}
break;
default:
INCOMPL();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment