refactor(session manager): turning the session manager into a stellar module

This commit is contained in:
luwenpeng
2024-09-20 16:56:05 +08:00
parent 620019cf8e
commit 94f1913e3e
20 changed files with 1944 additions and 1507 deletions

View File

@@ -5,6 +5,7 @@
#include "log_internal.h"
#include "packet_helper.h"
#include "packet_internal.h"
#include "stellar/exdata.h"
#define PACKET_LOG_ERROR(format, ...) STELLAR_LOG_ERROR(__thread_local_logger, "packet", format, ##__VA_ARGS__)
@@ -951,3 +952,15 @@ int packet_is_fragment(const struct packet *pkt)
{
return (pkt->frag_layer) ? 1 : 0;
}
void packet_set_exdata(struct packet *pkt, int idx, void *ex_ptr)
{
struct exdata_runtime *exdata_rt = (struct exdata_runtime *)packet_get_user_data(pkt);
exdata_set(exdata_rt, idx, ex_ptr);
}
void *packet_get_exdata(struct packet *pkt, int idx)
{
struct exdata_runtime *exdata_rt = (struct exdata_runtime *)packet_get_user_data(pkt);
return exdata_get(exdata_rt, idx);
}