From c97594afc4920f407b13560db3e3de9ab30fe4d2 Mon Sep 17 00:00:00 2001 From: liyuxi Date: Fri, 19 May 2023 08:25:53 +0000 Subject: [PATCH] fix(dlt645-1997):core in driver close --- plugins/file/file_plugin.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/file/file_plugin.c b/plugins/file/file_plugin.c index 12207bc3..a6b5f0f5 100644 --- a/plugins/file/file_plugin.c +++ b/plugins/file/file_plugin.c @@ -74,11 +74,11 @@ static neu_plugin_t *driver_open(void) static int driver_close(neu_plugin_t *plugin) { - free(plugin); - plog_notice(plugin, "close and free `%s` plugin success", plugin->common.name); + free(plugin); + return 0; } @@ -165,8 +165,9 @@ static int driver_write(neu_plugin_t *plugin, void *req, neu_datatag_t *tag, { int ret = file_write(plugin, req, tag, value); - plog_notice(plugin, "write response, ret: %d, tag_name: %s, type: %d", ret, - tag->name, tag->type); + plog_notice(plugin, + "write response, ret: %d, tag_name: %s, type: %d, address: %s", + ret, tag->name, tag->type, tag->address); return ret; }