From 2555525445b159fb3b368ba0240e4b208b069bf2 Mon Sep 17 00:00:00 2001 From: liyuxi Date: Mon, 8 May 2023 07:14:45 +0000 Subject: [PATCH] fix(dlt645):fix the connection status --- plugins/file/file_plugin.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/file/file_plugin.c b/plugins/file/file_plugin.c index 4fd205bb8..b7989b163 100644 --- a/plugins/file/file_plugin.c +++ b/plugins/file/file_plugin.c @@ -81,8 +81,7 @@ static int driver_close(neu_plugin_t *plugin) static int driver_init(neu_plugin_t *plugin) { - plugin->events = neu_event_new(); - plugin->common.link_state = NEU_NODE_LINK_STATE_CONNECTED; + plugin->events = neu_event_new(); return 0; } @@ -97,14 +96,14 @@ static int driver_uninit(neu_plugin_t *plugin) static int driver_start(neu_plugin_t *plugin) { - (void) plugin; + plugin->common.link_state = NEU_NODE_LINK_STATE_CONNECTED; return 0; } static int driver_stop(neu_plugin_t *plugin) { - (void) plugin; + plugin->common.link_state = NEU_NODE_LINK_STATE_DISCONNECTED; return 0; } @@ -121,7 +120,8 @@ static int driver_config(neu_plugin_t *plugin, const char *config) return -1; } - plugin->file_length = file_length.v.val_int; + plugin->file_length = file_length.v.val_int; + plugin->common.link_state = NEU_NODE_LINK_STATE_CONNECTED; return 0; }