rename flow_direction to flow_type

This commit is contained in:
luwenpeng
2024-09-02 17:49:33 +08:00
parent f8ec4dc5a7
commit a8206cffc0
28 changed files with 598 additions and 599 deletions

View File

@@ -128,7 +128,7 @@ static void http_event_handler(enum http_event event, struct http_decoder_half_d
case HTTP_EVENT_REQ_LINE:
msg = http_message_new(HTTP_MESSAGE_REQ_LINE, queue, queue_idx, HTTP_REQUEST);
session_mq_publish_message(ev_ctx->ref_session, exdata->pub_topic_id, msg);
if (httpd_tunnel_identify(httpd_env, FLOW_DIRECTION_C2S, half_data))
if (httpd_tunnel_identify(httpd_env, FLOW_TYPE_C2S, half_data))
{
exdata->tunnel_state = HTTP_TUN_C2S_HDR_START;
// http_decoder_stat_update(&httpd_env->hd_stat, thread_id, HTTPD_STAT_TUNNEL, 1);
@@ -259,7 +259,7 @@ static void http_event_handler(enum http_event event, struct http_decoder_half_d
case HTTP_EVENT_RES_LINE:
msg = http_message_new(HTTP_MESSAGE_RES_LINE, queue, queue_idx, HTTP_RESPONSE);
session_mq_publish_message(ev_ctx->ref_session, exdata->pub_topic_id, msg);
if (httpd_tunnel_identify(httpd_env, FLOW_DIRECTION_S2C, half_data))
if (httpd_tunnel_identify(httpd_env, FLOW_TYPE_S2C, half_data))
{
exdata->tunnel_state = HTTP_TUN_S2C_START;
}
@@ -668,8 +668,8 @@ extern "C"
int thread_id = stellar_get_current_thread_index();
struct http_decoder_half *cur_half = NULL;
enum flow_direction sess_dir = session_get_current_flow_direction(sess);
if (FLOW_DIRECTION_C2S == sess_dir)
enum flow_type sess_dir = session_get_flow_type(sess);
if (FLOW_TYPE_C2S == sess_dir)
{
cur_half = exdata->decoder->c2s_half;
http_decoder_stat_update(&httpd_env->hd_stat, thread_id, HTTP_C2S_BYTES, payload_len);