Merge pull request #723 from fengzeroz/main

chore(plugin): add node name in plugin_common
This commit is contained in:
fengzeroz
2022-08-19 17:56:44 +08:00
committed by GitHub
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -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;
+1
View File
@@ -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,