🦄 refactor(plugin_manager): refactor intrinsic topic name
This commit is contained in:
@@ -271,8 +271,8 @@ void *debug_plugin_init(struct stellar *st)
|
||||
ctx->st = st;
|
||||
ctx->sess_exdata_idx = stellar_exdata_new_index(st, "DEBUG_PLUGIN_SESS_EXDATA", stellar_exdata_free_default, NULL);
|
||||
ctx->sess_plug_id = stellar_session_plugin_register(st, on_sess_new, on_sess_free, ctx);
|
||||
ctx->udp_topic_id = stellar_mq_get_topic_id(st, TOPIC_UDP);
|
||||
ctx->tcp_topic_id = stellar_mq_get_topic_id(st, TOPIC_TCP);
|
||||
ctx->udp_topic_id = stellar_mq_get_topic_id(st, TOPIC_UDP_INPUT);
|
||||
ctx->tcp_topic_id = stellar_mq_get_topic_id(st, TOPIC_TCP_INPUT);
|
||||
ctx->tcp_stream_topic_id = stellar_mq_get_topic_id(st, TOPIC_TCP_STREAM);
|
||||
|
||||
stellar_session_mq_subscribe(st, ctx->udp_topic_id, on_sess_udp_msg, ctx->sess_plug_id);
|
||||
|
||||
@@ -167,8 +167,8 @@ extern "C" void *GLIMPSE_DETECTOR_TEST_PLUG_LOAD(struct stellar *st)
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
int tcp_topic_id=stellar_mq_get_topic_id(st, TOPIC_TCP);
|
||||
int udp_topic_id=stellar_mq_get_topic_id(st, TOPIC_UDP);
|
||||
int tcp_topic_id=stellar_mq_get_topic_id(st, TOPIC_TCP_INPUT);
|
||||
int udp_topic_id=stellar_mq_get_topic_id(st, TOPIC_UDP_INPUT);
|
||||
if(tcp_topic_id < 0 || udp_topic_id < 0)
|
||||
{
|
||||
perror("GLIMPSE_DETECTOR_TEST get tcp or udp topic id failed\n");
|
||||
|
||||
@@ -557,8 +557,8 @@ void *packet_inject_init(struct stellar *st)
|
||||
print_config(ctx->logger, &ctx->config);
|
||||
|
||||
ctx->sess_plug_id = stellar_session_plugin_register(st, on_sess_new, on_sess_free, ctx);
|
||||
ctx->tcp_topic_id = stellar_mq_get_topic_id(st, TOPIC_TCP);
|
||||
ctx->udp_topic_id = stellar_mq_get_topic_id(st, TOPIC_UDP);
|
||||
ctx->tcp_topic_id = stellar_mq_get_topic_id(st, TOPIC_TCP_INPUT);
|
||||
ctx->udp_topic_id = stellar_mq_get_topic_id(st, TOPIC_UDP_OUTPUT);
|
||||
|
||||
stellar_session_mq_subscribe(st, ctx->tcp_topic_id, on_sess_msg, ctx->sess_plug_id);
|
||||
stellar_session_mq_subscribe(st, ctx->udp_topic_id, on_sess_msg, ctx->sess_plug_id);
|
||||
|
||||
Reference in New Issue
Block a user