mirror of
https://github.com/emqx/neuron.git
synced 2026-10-21 08:45:47 +08:00
Merge pull request #723 from fengzeroz/main
chore(plugin): add node name in plugin_common
This commit is contained in:
@@ -39,6 +39,7 @@ typedef struct neu_plugin_common {
|
||||
|
||||
neu_adapter_t * adapter;
|
||||
const adapter_callbacks_t *adapter_callbacks;
|
||||
char name[NEU_NODE_NAME_LEN];
|
||||
|
||||
neu_node_link_state_e link_state;
|
||||
uint16_t tag_size;
|
||||
|
||||
@@ -107,6 +107,7 @@ neu_adapter_t *neu_adapter_create(neu_adapter_info_t *info, bool start)
|
||||
common->adapter_callbacks = &adapter->cb_funs;
|
||||
common->link_state = NEU_NODE_LINK_STATE_DISCONNECTED;
|
||||
common->log = zlog_get_category(adapter->name);
|
||||
strcpy(common->name, adapter->name);
|
||||
|
||||
adapter->module->intf_funs->init(adapter->plugin);
|
||||
if (adapter_load_setting(adapter->persister, adapter->name,
|
||||
|
||||
Reference in New Issue
Block a user