TSG-16126 修复Proxy Events日志中存在c2s和s2c有字节数为0的问题
This commit is contained in:
@@ -217,9 +217,18 @@ int proxy_send_log(struct proxy_logger* handle, const struct proxy_log* log_msg)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
size_t c2s_byte_num = 0, s2c_byte_num =0;
|
||||
tfe_stream_info_get(log_msg->stream, INFO_FROM_DOWNSTREAM_RX_OFFSET, &c2s_byte_num, sizeof(c2s_byte_num));
|
||||
tfe_stream_info_get(log_msg->stream, INFO_FROM_UPSTREAM_RX_OFFSET, &s2c_byte_num, sizeof(s2c_byte_num));
|
||||
|
||||
size_t ret=0, c2s_byte_num = 0, s2c_byte_num =0;
|
||||
ret = tfe_stream_info_get(log_msg->stream, INFO_FROM_DOWNSTREAM_RX_OFFSET, &c2s_byte_num, sizeof(c2s_byte_num));
|
||||
if(ret != 0)
|
||||
{
|
||||
c2s_byte_num = log_msg->c2s_byte_num;
|
||||
}
|
||||
ret = tfe_stream_info_get(log_msg->stream, INFO_FROM_UPSTREAM_RX_OFFSET, &s2c_byte_num, sizeof(s2c_byte_num));
|
||||
if(ret !=0)
|
||||
{
|
||||
s2c_byte_num = log_msg->s2c_byte_num;
|
||||
}
|
||||
|
||||
cJSON_AddNumberToObject(common_obj, "common_link_id", 0);
|
||||
cJSON_AddNumberToObject(common_obj, "common_stream_dir", 3); //1:c2s, 2:s2c, 3:double
|
||||
|
||||
Reference in New Issue
Block a user