✨ feat(session_manager): init return with handle
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
struct stellar_event_base_loop_arg
|
||||
{
|
||||
struct packet_io_device *dev;
|
||||
struct session_manager_handle *s_mgr;
|
||||
int thread_id;
|
||||
};
|
||||
|
||||
@@ -18,11 +19,11 @@ void stellar_event_base_loop(struct stellar_event_base_loop_arg *arg)
|
||||
int fetch_num = packet_io_rx(arg->dev, arg->thread_id, &rx_pkt, 1);
|
||||
if(fetch_num > 0)
|
||||
{
|
||||
event = session_manager_commit(rx_pkt);
|
||||
event = session_manager_commit(arg->s_mgr, rx_pkt);
|
||||
while(event)
|
||||
{
|
||||
plugin_manager_dispatch(event);
|
||||
event = session_manager_fetch_event();
|
||||
event = session_manager_fetch_event(arg->s_mgr);
|
||||
}
|
||||
|
||||
//clean session_manager event queue
|
||||
@@ -48,8 +49,8 @@ struct packet_io_device *packet_io_init(int worker_thread_num, const char *insta
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
//config_manager_init
|
||||
|
||||
//config_init
|
||||
struct session_manager_handle *h = session_manager_init();
|
||||
plugin_session_event_register("HTTP", http_decoder, nullptr);
|
||||
//packet_io_init
|
||||
|
||||
|
||||
Reference in New Issue
Block a user