diff options
| author | 杨威 <[email protected]> | 2023-05-25 18:03:58 +0800 |
|---|---|---|
| committer | 杨威 <[email protected]> | 2023-05-26 14:40:13 +0800 |
| commit | 00e08fa61d468f4b652f06c047d85d7734280650 (patch) | |
| tree | 2275d7ef9eb4f34b3958f486ed45430aeb64772a /test | |
| parent | 7483ec1b6e457c1c479c5baa10ca3a4d7376ecde (diff) | |
🐞 fix(stream_state_data_process): 修复同时返回kill_other和dropme时,处理逻辑错误的bugv4.3.4
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_app_sapp.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/test_app_sapp.c b/test/test_app_sapp.c index 2a511c2..0b99638 100644 --- a/test/test_app_sapp.c +++ b/test/test_app_sapp.c @@ -892,11 +892,25 @@ char testudpApp_2(struct streaminfo *pstream,void **pme, int thread_seq,void *a_ } -char testtcpApp_1(struct streaminfo *pstream,void **pme, int thread_seq,void *a_packet) +char testtcpApp_3_dropme_killother(struct streaminfo *pstream,void **pme, int thread_seq,void *a_packet) { struct tcpdetail *pdetail=(struct tcpdetail *)pstream->pdetail; if(pdetail->clientpktnum >3) + { + return APP_STATE_DROPME|APP_STATE_KILL_OTHER; + } + else + { + return APP_STATE_GIVEME; + } +} + +char testtcpApp_10(struct streaminfo *pstream,void **pme, int thread_seq,void *a_packet) +{ + struct tcpdetail *pdetail=(struct tcpdetail *)pstream->pdetail; + + if(pdetail->clientpktnum >10) return APP_STATE_DROPME; else return APP_STATE_GIVEME; |
