Make adapter_loop handle MSG_EVENT_LIC_UPDATED event

This commit is contained in:
eeff
2022-03-01 12:06:19 +08:00
parent 19d914e6db
commit ee409eea60
+18
View File
@@ -923,6 +923,24 @@ static void adapter_loop(void *arg)
break;
}
case MSG_EVENT_LIC_UPDATED: {
neu_event_lic_updated_t *lic_event = msg_get_buf_ptr(pay_msg);
neu_reqresp_update_lic_t lic_update = {};
lic_update.lic_fname = lic_event->lic_fname;
const neu_plugin_intf_funs_t *intf_funs;
neu_request_t req;
intf_funs = adapter->plugin_module->intf_funs;
req.req_id = adapter_get_req_id(adapter);
req.req_type = NEU_REQRESP_UPDATE_LIC;
req.sender_id = 0;
req.buf_len = sizeof(lic_update);
req.buf = &lic_update;
intf_funs->request(adapter->plugin, &req);
break;
}
case MSG_CMD_SUBSCRIBE_NODE: {
subscribe_node_cmd_t *cmd_ptr;
cmd_ptr = (subscribe_node_cmd_t *) msg_get_buf_ptr(pay_msg);