feat(ha-config-bootstrap): implement OP_ctrlHello state sync handler (task 9.3)

This commit is contained in:
Rongsong Shen 2026-05-29 05:22:17 +00:00
parent 0ec0ffa7e3
commit 94bf5d94b8
9 changed files with 396 additions and 3 deletions

View file

@ -212,6 +212,16 @@ static int myreq_handler(vtask_t* task)
cbuf_put(&(c->wbuf), &stop);
break;
case OPCode_hello:
if (request.body_which == Request_body_ctrlhellomsg) {
/* Extended OP_ctrlHello with CtrlHelloRequest body — state sync (Req 6.5–6.7) */
rc = handle_ctrlhello(c, ep, &request);
} else {
/* Legacy plain OP_hello (nop path) */
reply.status = 0;
reply.data_which = RequestReply_data_nodata;
xce_reply(ep, c->myhost, &reply);
}
break;
case OPCode_nop:
reply.status = 0;
reply.data_which = RequestReply_data_nodata;