summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluwenpeng <[email protected]>2024-08-13 09:45:35 +0800
committerluwenpeng <[email protected]>2024-08-13 09:45:35 +0800
commit646b95303fd1182f2ceabb6c222206263b98813a (patch)
tree86f64cdee1b4fe2d1eabf8eb075dd64a19dc34cb
parentea0d743b1a5f83b773e054fc4008e22b48c1563a (diff)
fix: plugin mananger get TCP segment
-rw-r--r--src/plugin/plugin_manager.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/plugin/plugin_manager.cpp b/src/plugin/plugin_manager.cpp
index 49562b6..85728b0 100644
--- a/src/plugin/plugin_manager.cpp
+++ b/src/plugin/plugin_manager.cpp
@@ -1037,12 +1037,11 @@ void plugin_manager_on_session_ingress(struct session *sess, struct packet *pkt)
{
case SESSION_TYPE_TCP:
session_mq_publish_message_with_priority(sess, plug_mgr_rt->plug_mgr->tcp_topic_id ,(void *)pkt, STELLAR_MQ_PRIORITY_HIGH);
- if((seg = session_get_tcp_segment(sess)) != NULL)
- {
- session_mq_publish_message_with_priority(sess, plug_mgr_rt->plug_mgr->tcp_stream_topic_id ,(void *)seg, STELLAR_MQ_PRIORITY_HIGH);
- //session_free_tcp_segment(sess, seg);
- }
- break;
+ while ((seg = session_get_tcp_segment(sess)) != NULL)
+ {
+ session_mq_publish_message_with_priority(sess, plug_mgr_rt->plug_mgr->tcp_stream_topic_id, (void *)seg, STELLAR_MQ_PRIORITY_HIGH);
+ }
+ break;
case SESSION_TYPE_UDP:
session_mq_publish_message_with_priority(sess, plug_mgr_rt->plug_mgr->udp_topic_id ,(void *)pkt, STELLAR_MQ_PRIORITY_HIGH);
break;