rename session_get0_current_packet() to session_get_current_packet()

This commit is contained in:
luwenpeng
2024-11-01 15:36:18 +08:00
parent c05d3fe2d5
commit da9e15264d
20 changed files with 52 additions and 52 deletions

View File

@@ -160,7 +160,7 @@ void session_set_current_packet(struct session *sess, const struct packet *pkt)
sess->curr_pkt = pkt;
}
const struct packet *session_get0_current_packet(const struct session *sess)
const struct packet *session_get_current_packet(const struct session *sess)
{
return sess->curr_pkt;
}
@@ -386,7 +386,7 @@ int session_to_str(const struct session *sess, int bref, char *buff, int size)
used += snprintf(buff + used, size - used, "\"state\":\"%s\",", session_state_to_str(session_get_current_state(sess)));
used += snprintf(buff + used, size - used, "\"closing_reason\":\"%s\",", closing_reason_to_str(session_get_closing_reason(sess)));
used += snprintf(buff + used, size - used, "\"duplicate_traffic\":%d,", session_has_duplicate_traffic(sess));
used += snprintf(buff + used, size - used, "\"current_packet\":\"%p\",", session_get0_current_packet(sess));
used += snprintf(buff + used, size - used, "\"current_packet\":\"%p\",", session_get_current_packet(sess));
const char *str[] = {"c2s", "s2c"};
enum flow_type type[] = {FLOW_TYPE_C2S, FLOW_TYPE_S2C};