add error filter to avoid rpc error

This commit is contained in:
obdev 2023-04-24 07:41:18 +00:00 committed by ob-robot
parent 7beeb7dd31
commit f2c45a5f49

View File

@ -97,9 +97,9 @@ static int easy_decode_uint16(char *buf, const int64_t data_len, int64_t *pos, u
if (ret == EASY_OK) {
*val = (uint16_t)(((*(buf + (*pos)++)) & 0xff) << 8);
*val = (uint16_t)(*val | (*(buf + (*pos)++) & 0xff));
}
*val = (uint16_t)(*val | (*(buf + (*pos)++) & 0xff));
}
return ret;
}
@ -131,9 +131,9 @@ static int easy_encode_negotiation_msg(easy_negotiation_msg_t *ne_msg, char *buf
return ret;
}
buf[pos++] = ne_msg->msg_body.io_thread_index;
*encode_len = pos;
buf[pos++] = ne_msg->msg_body.io_thread_index;
*encode_len = pos;
return ret;
}