summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2023-09-06 17:58:13 +0800
committerliuxueli <[email protected]>2023-09-06 17:58:13 +0800
commit12a97dede4cb6e58f71bbb53562d9f88357a3b15 (patch)
treea800ae7ae3c7e504ba2d677de939ac38b5b8bf2b
parent324a4e47fdf975a389846789a463296d120580bf (diff)
TSG-15343: TCPALL入口判断Drop After N Packet时, 增加会话是否执行为Drop After N Packet的策略标识
-rw-r--r--src/tsg_bridge.cpp1
-rw-r--r--src/tsg_bridge.h3
-rw-r--r--src/tsg_entry.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/tsg_bridge.cpp b/src/tsg_bridge.cpp
index 140514b..ac566d7 100644
--- a/src/tsg_bridge.cpp
+++ b/src/tsg_bridge.cpp
@@ -663,6 +663,7 @@ int srt_action_context_set_after_n_packet(const struct streaminfo *a_stream, int
}
srt_action_context->hited_para.after_n_packets=after_n_packets;
+ srt_action_context->is_drop_after_n_packets=1;
return 1;
}
diff --git a/src/tsg_bridge.h b/src/tsg_bridge.h
index 54d4733..e3a2b91 100644
--- a/src/tsg_bridge.h
+++ b/src/tsg_bridge.h
@@ -119,7 +119,8 @@ struct session_runtime_action_context
char set_latency_flag;
char direction;
char state;
- char padding[4];
+ char is_drop_after_n_packets;
+ char padding[3];
enum TSG_METHOD_TYPE method_type;
enum TSG_PROTOCOL protocol;
char *l4_protocol;
diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp
index 687e631..8cb48c1 100644
--- a/src/tsg_entry.cpp
+++ b/src/tsg_entry.cpp
@@ -2389,7 +2389,7 @@ static unsigned char tsg_master_all_entry(const struct streaminfo *a_stream, uns
case TSG_METHOD_TYPE_DROP:
case TSG_METHOD_TYPE_APP_DROP:
{
- if(srt_action_context->hited_para.after_n_packets==0)
+ if(srt_action_context->is_drop_after_n_packets==0)
{
break;
}