mirror of
https://github.com/emqx/neuron.git
synced 2026-10-28 22:59:34 +08:00
Delete the first errorcode in the read/write result
This commit is contained in:
@@ -206,6 +206,10 @@ int neu_datatag_pack_add(neu_data_val_t *val, uint16_t index, neu_dtype_e type,
|
||||
tv = neu_dvalue_new(NEU_DTYPE_ERRORCODE);
|
||||
neu_dvalue_set_errorcode(tv, *(int32_t *) data);
|
||||
break;
|
||||
case NEU_DTYPE_BIT:
|
||||
tv = neu_dvalue_new(NEU_DTYPE_BIT);
|
||||
neu_dvalue_set_bit(tv, *(uint8_t *) data);
|
||||
break;
|
||||
case NEU_DTYPE_INT8:
|
||||
tv = neu_dvalue_new(NEU_DTYPE_INT8);
|
||||
neu_dvalue_set_int8(tv, *(int8_t *) data);
|
||||
|
||||
@@ -42,11 +42,17 @@ int neu_json_encode_read_resp(void *json_object, void *param)
|
||||
.t = p_tag->t,
|
||||
.v = p_tag->value,
|
||||
},
|
||||
{
|
||||
.name = "error",
|
||||
.t = NEU_JSON_INT,
|
||||
.v.val_int = p_tag->error,
|
||||
},
|
||||
{
|
||||
.name = "id",
|
||||
.t = NEU_JSON_INT,
|
||||
.v.val_int = p_tag->id,
|
||||
} };
|
||||
|
||||
tag_array = neu_json_encode_array(tag_array, tag_elems,
|
||||
NEU_JSON_ELEM_SIZE(tag_elems));
|
||||
p_tag++;
|
||||
|
||||
Reference in New Issue
Block a user