summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2023-01-13 10:03:54 +0800
committerliuxueli <[email protected]>2023-01-13 10:03:54 +0800
commit18a38e571e6bfd8adcedcf33be8d91271d1ee710 (patch)
treed13ae0bdf0679d428725b7cc5443ca6acc0579a1 /src
parenteeae469a3f74d85fa8ccddf1426243c68f148f60 (diff)
TSG-13040: 修复common_app_id字段记录识别过程出现异常的问题,一个会话上推送两个结果会出现app_id=0的现象v5.8.11
Diffstat (limited to 'src')
-rw-r--r--src/tsg_entry.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp
index 4c1f464..7b1b443 100644
--- a/src/tsg_entry.cpp
+++ b/src/tsg_entry.cpp
@@ -988,14 +988,14 @@ static void copy_bypass_result(const struct streaminfo *a_stream, struct master_
int copy_app_result(struct gather_app_result *gather_result, struct app_identify_result *identify_result, int packet_sequence)
{
- int i=0;
- for(i=0; (i < identify_result->app_id_num) && i<MAX_APP_ID_NUM && (gather_result->app_num < MAX_APP_ID_NUM); i++)
+ if(identify_result->app_id_num<=gather_result->app_num)
{
- if(gather_result->attributes[i].app_id==identify_result->app_id[i] && gather_result->attributes[i].surrogate_id==identify_result->surrogate_id[i])
- {
- continue;
- }
-
+ return 0;
+ }
+
+ gather_result->app_num=0;
+ for(int i=0; (i < identify_result->app_id_num) && i<MAX_APP_ID_NUM && (gather_result->app_num < MAX_APP_ID_NUM); i++)
+ {
gather_result->origin=identify_result->origin;
gather_result->attributes[i].app_id=identify_result->app_id[i];
gather_result->attributes[i].surrogate_id=identify_result->surrogate_id[i];