TSG-2611: 修改日志输出streamid 错误
This commit is contained in:
@@ -345,7 +345,7 @@ static int pxy_tcp_option_scan_addr(Maat_feather_t maat_feather,const struct str
|
|||||||
|
|
||||||
if(a_stream==NULL || maat_feather==NULL || result_num <=0 || result == NULL)
|
if(a_stream==NULL || maat_feather==NULL || result_num <=0 || result == NULL)
|
||||||
{
|
{
|
||||||
KNI_LOG_ERROR(logger,"SCAN_ADDR a_stream==NULL || maat_feather==NULL || result_num <= 0 || result == NULL ,streamid=%d ", pmeinfo->stream_traceid);
|
KNI_LOG_ERROR(logger,"SCAN_ADDR a_stream==NULL || maat_feather==NULL || result_num <= 0 || result == NULL ,streamid=%s ", pmeinfo->stream_traceid);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -387,12 +387,12 @@ static int pxy_tcp_option_scan_addr(Maat_feather_t maat_feather,const struct str
|
|||||||
|
|
||||||
if(maat_ret > 0)
|
if(maat_ret > 0)
|
||||||
{
|
{
|
||||||
KNI_LOG_DEBUG(logger,"SCAN_IP,Hit streamid: %d",pmeinfo->stream_traceid);
|
KNI_LOG_DEBUG(logger,"SCAN_IP,Hit streamid: %s",pmeinfo->stream_traceid);
|
||||||
hit_num+=maat_ret;
|
hit_num+=maat_ret;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KNI_LOG_DEBUG(logger,"SCAN_IP,Not hit streamid: %d,scan ret: %d",
|
KNI_LOG_DEBUG(logger,"SCAN_IP,Not hit streamid: %s,scan ret: %d",
|
||||||
pmeinfo->stream_traceid,
|
pmeinfo->stream_traceid,
|
||||||
maat_ret);
|
maat_ret);
|
||||||
}
|
}
|
||||||
@@ -424,14 +424,14 @@ static int pxy_tcp_option_scan_domain(Maat_feather_t maat_feather, Maat_rule_t *
|
|||||||
pmeinfo->thread_seq);
|
pmeinfo->thread_seq);
|
||||||
if(maat_ret > 0)
|
if(maat_ret > 0)
|
||||||
{
|
{
|
||||||
KNI_LOG_DEBUG(logger,"SCAN_DOMAIN,Hit streamid: %d, domain: %s",
|
KNI_LOG_DEBUG(logger,"SCAN_DOMAIN,Hit streamid: %s, domain: %s",
|
||||||
pmeinfo->stream_traceid,
|
pmeinfo->stream_traceid,
|
||||||
pmeinfo->domain);
|
pmeinfo->domain);
|
||||||
hit_num += maat_ret;
|
hit_num += maat_ret;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
KNI_LOG_DEBUG(logger,"SCAN_DOMAIN,Not hit stream_traceid: %d ,domain :%s scan ret: %d",
|
KNI_LOG_DEBUG(logger,"SCAN_DOMAIN,Not hit stream_traceid: %s ,domain :%s scan ret: %d",
|
||||||
pmeinfo->stream_traceid,
|
pmeinfo->stream_traceid,
|
||||||
pmeinfo->domain,
|
pmeinfo->domain,
|
||||||
maat_ret);
|
maat_ret);
|
||||||
@@ -488,26 +488,26 @@ int pxy_tcp_option_get_param(Maat_feather_t maat_feather,const struct streaminfo
|
|||||||
do {
|
do {
|
||||||
if(p_result == NULL)
|
if(p_result == NULL)
|
||||||
{
|
{
|
||||||
KNI_LOG_DEBUG(logger,"Scan not hit, Proxy tcp option using default param, streamid = %d", pmeinfo->stream_traceid);
|
KNI_LOG_DEBUG(logger,"Scan not hit, Proxy tcp option using default param, streamid = %s", pmeinfo->stream_traceid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
KNI_LOG_DEBUG(logger,"Scan hit, hit_num = %d, streamid = %d", hit_num, pmeinfo->stream_traceid);
|
KNI_LOG_DEBUG(logger,"Scan hit, hit_num = %d, streamid = %s", hit_num, pmeinfo->stream_traceid);
|
||||||
|
|
||||||
tmp_buff=(char *)calloc(1, p_result->serv_def_len+1);
|
tmp_buff=(char *)calloc(1, p_result->serv_def_len+1);
|
||||||
|
|
||||||
Maat_read_rule(g_tsg_maat_feather, p_result, MAAT_RULE_SERV_DEFINE, tmp_buff, p_result->serv_def_len);
|
Maat_read_rule(g_tsg_maat_feather, p_result, MAAT_RULE_SERV_DEFINE, tmp_buff, p_result->serv_def_len);
|
||||||
if( strlen(tmp_buff) < strlen("{}") + 1)
|
if( strlen(tmp_buff) < strlen("{}") + 1)
|
||||||
{
|
{
|
||||||
KNI_LOG_DEBUG(logger, "Scan hit, Get extra data error: No json data or data is null,streamid = %d", pmeinfo->stream_traceid);
|
KNI_LOG_DEBUG(logger, "Scan hit, Get extra data error: No json data or data is null,streamid = %s", pmeinfo->stream_traceid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
ret = pxy_tcp_option_parse_json((const struct Maat_rule_t*)p_result, (const char*)tmp_buff, pxy_tcpop, logger);
|
ret = pxy_tcp_option_parse_json((const struct Maat_rule_t*)p_result, (const char*)tmp_buff, pxy_tcpop, logger);
|
||||||
if(ret != 1)
|
if(ret != 1)
|
||||||
{
|
{
|
||||||
KNI_LOG_DEBUG(logger,"Scan hit, json parse error,Proxy tcp option using default param,streamid = %d", pmeinfo->stream_traceid);
|
KNI_LOG_DEBUG(logger,"Scan hit, json parse error,Proxy tcp option using default param,streamid = %s", pmeinfo->stream_traceid);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
KNI_LOG_DEBUG(logger, "Proxy tcp option, streamid: %d,param:%s", pmeinfo->stream_traceid,tmp_buff);
|
KNI_LOG_DEBUG(logger, "Proxy tcp option, streamid: %s,param:%s", pmeinfo->stream_traceid,tmp_buff);
|
||||||
is_not_default = 1;
|
is_not_default = 1;
|
||||||
free(tmp_buff);
|
free(tmp_buff);
|
||||||
tmp_buff = NULL;
|
tmp_buff = NULL;
|
||||||
@@ -516,7 +516,7 @@ int pxy_tcp_option_get_param(Maat_feather_t maat_feather,const struct streaminfo
|
|||||||
if(is_not_default != 1)
|
if(is_not_default != 1)
|
||||||
{
|
{
|
||||||
memcpy((void *)pxy_tcpop, (const void *)&g_kni_handle->pxy_tcp_option, sizeof(g_kni_handle->pxy_tcp_option));
|
memcpy((void *)pxy_tcpop, (const void *)&g_kni_handle->pxy_tcp_option, sizeof(g_kni_handle->pxy_tcp_option));
|
||||||
KNI_LOG_DEBUG(logger, "Proxy tcp option, streamid: %d, Using default policy", pmeinfo->stream_traceid);
|
KNI_LOG_DEBUG(logger, "Proxy tcp option, streamid: %s, Using default policy", pmeinfo->stream_traceid);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(mid!=NULL)
|
if(mid!=NULL)
|
||||||
|
|||||||
Reference in New Issue
Block a user