mirror of
https://github.com/emqx/neuron.git
synced 2026-10-23 18:37:45 +08:00
Merge pull request #677 from eeff/eeff/dev
fix(persistence): correct sqlite type substitution
This commit is contained in:
+2
-3
@@ -119,9 +119,8 @@ int manager_load_node(neu_manager_t *manager)
|
||||
rv = neu_manager_add_node(manager, node_info->name,
|
||||
node_info->plugin_name);
|
||||
const char *ok_or_err = (0 == rv) ? "success" : "fail";
|
||||
nlog_info("load adapter %s type:%" PRId64 ", name:%s plugin:%s",
|
||||
ok_or_err, node_info->type, node_info->name,
|
||||
node_info->plugin_name);
|
||||
nlog_info("load adapter %s type:%d, name:%s plugin:%s", ok_or_err,
|
||||
node_info->type, node_info->name, node_info->plugin_name);
|
||||
}
|
||||
|
||||
utarray_free(node_infos);
|
||||
|
||||
@@ -1006,8 +1006,8 @@ int neu_persister_store_group(neu_persister_t * persister,
|
||||
{
|
||||
return execute_sql(
|
||||
persister->db,
|
||||
"INSERT INTO groups (driver_name, name, interval) VALUES (%Q, %Q, %i)",
|
||||
driver_name, group_info->name, group_info->interval);
|
||||
"INSERT INTO groups (driver_name, name, interval) VALUES (%Q, %Q, %u)",
|
||||
driver_name, group_info->name, (unsigned) group_info->interval);
|
||||
}
|
||||
|
||||
static UT_icd group_info_icd = {
|
||||
|
||||
@@ -30,10 +30,10 @@ extern "C" {
|
||||
typedef neu_json_plugin_req_plugin_t neu_persist_plugin_info_t;
|
||||
|
||||
typedef struct {
|
||||
char * name;
|
||||
int64_t type;
|
||||
char * plugin_name;
|
||||
int64_t state;
|
||||
char *name;
|
||||
int type;
|
||||
char *plugin_name;
|
||||
int state;
|
||||
} neu_persist_node_info_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user