diff --git a/src/tsg_bridge.cpp b/src/tsg_bridge.cpp index 1c018bd..a65db43 100644 --- a/src/tsg_bridge.cpp +++ b/src/tsg_bridge.cpp @@ -568,7 +568,7 @@ int session_runtime_action_context_async(const struct streaminfo *a_stream, void const struct session_runtime_action_context *session_runtime_action_context_new(const struct streaminfo *a_stream) { - struct session_runtime_action_context *srt_action_context=(struct session_runtime_action_context *)session_async_bridge_get_data(a_stream, g_tm_bridge_para[BRIDGE_TYPE_SESSION_PROCESS_CONTEXT].id); + struct session_runtime_action_context *srt_action_context=(struct session_runtime_action_context *)session_async_bridge_get_data(a_stream, g_tm_bridge_para[BRIDGE_TYPE_SESSION_ACTION_CONTEXT].id); if(srt_action_context==NULL) { srt_action_context=(struct session_runtime_action_context *)dictator_malloc(a_stream->threadnum, sizeof(struct session_runtime_action_context)); diff --git a/src/tsg_entry.cpp b/src/tsg_entry.cpp index cf03d1b..99f06d3 100644 --- a/src/tsg_entry.cpp +++ b/src/tsg_entry.cpp @@ -1499,7 +1499,12 @@ size_t session_app_id_and_properties_scan(const struct streaminfo *a_stream, str srt_process_context->hited_para.after_n_packets=after_n_packets; } } - + + if(srt_process_context!=NULL && srt_process_context->hited_app_id>0) + { + session_app_gather_results_update_matched_app_id(a_stream, srt_process_context->hited_app_id); + } + return hit_num; } diff --git a/src/tsg_rule.cpp b/src/tsg_rule.cpp index cb17006..7759912 100644 --- a/src/tsg_rule.cpp +++ b/src/tsg_rule.cpp @@ -2800,7 +2800,7 @@ size_t tsg_scan_nesting_addr(const struct streaminfo *a_stream, struct maat *fea return 0; } - struct session_runtime_attribute *srt_attribute=(struct session_runtime_attribute *)session_runtime_attribute_get(a_stream); + struct session_runtime_attribute *srt_attribute=(struct session_runtime_attribute *)session_runtime_attribute_new(a_stream); srt_attribute_set_ip_asn(a_stream, feather, &(srt_attribute->client_asn), &(srt_attribute->server_asn)); srt_attribute_set_ip_location(a_stream, feather, &(srt_attribute->client_location), &(srt_attribute->server_location)); diff --git a/test/src/gtest_rule.cpp b/test/src/gtest_rule.cpp index 74ec87e..3a36338 100644 --- a/test/src/gtest_rule.cpp +++ b/test/src/gtest_rule.cpp @@ -14,6 +14,11 @@ extern struct maat_runtime_para g_tsg_maat_rt_para; +const struct session_runtime_attribute *session_runtime_attribute_new(const struct streaminfo * a_stream) +{ + return NULL; +} + const struct session_runtime_attribute *session_runtime_attribute_get(const struct streaminfo * a_stream) { return 0;