update session manager interface definition; define ex_data interface; delete the event design

This commit is contained in:
liuxueli
2022-08-25 18:13:46 +08:00
parent 9cfa120ae7
commit e3ea4d0729
17 changed files with 623 additions and 172 deletions

View File

@@ -28,20 +28,20 @@ struct stellar_event_base_loop_arg
void *stellar_event_base_loop(void *arg)
{
struct stellar_packet *rx_pkt;
struct stellar_event *event;
struct stellar_session *session;
struct stellar_event_base_loop_arg *thread_arg = (struct stellar_event_base_loop_arg *)arg;
while(1)
{
int fetch_num = packet_io_device_rx(thread_arg->dev, thread_arg->tid, &rx_pkt, 1);
if(fetch_num > 0)
{
event = session_manager_commit(thread_arg->session_mgr, rx_pkt);
while(event)
session = session_manager_commit(thread_arg->session_mgr, rx_pkt, thread_arg->tid);
while(session)
{
plugin_manager_dispatch(thread_arg->plug_mgr ,event);
event = session_manager_fetch_event(thread_arg->session_mgr);
plugin_manager_dispatch(thread_arg->plug_mgr ,session);
session = session_manager_fetch_session(thread_arg->session_mgr, session, thread_arg->tid);
}
//clean session_manager event queue
packet_io_device_tx(thread_arg->dev, thread_arg->tid, &rx_pkt, 1);
}