修改文件编码

This commit is contained in:
wangmenglan
2023-04-24 10:48:40 +08:00
parent 11a46269f1
commit 8a7c196c20
18 changed files with 1588 additions and 1194 deletions

View File

@@ -21,18 +21,6 @@ void session_ctx_free(struct session_ctx *ctx)
{
if (ctx)
{
if (ctx->first_ctrl_pkt.addr_string)
{
free(ctx->first_ctrl_pkt.addr_string);
ctx->first_ctrl_pkt.addr_string = NULL;
}
if (ctx->first_ctrl_pkt.header_data)
{
free(ctx->first_ctrl_pkt.header_data);
ctx->first_ctrl_pkt.header_data = NULL;
}
if (ctx->cmsg)
{
tfe_cmsg_destroy(ctx->cmsg);
@@ -43,13 +31,11 @@ void session_ctx_free(struct session_ctx *ctx)
}
}
/******************************************************************************
* acceptor_ctx
******************************************************************************/
struct acceptor_ctx *acceptor_ctx_create(const char *profile)
{
int ret = 0;
struct acceptor_ctx *ctx = ALLOC(struct acceptor_ctx, 1);
MESA_load_profile_int_def(profile, "system", "firewall_sids", (int *)&(ctx->firewall_sids), 1001);
@@ -83,17 +69,6 @@ struct acceptor_ctx *acceptor_ctx_create(const char *profile)
goto error_out;
}
// ctx->enforcer = policy_enforcer_create("KNI", profile, ctx->nr_worker_threads, NULL);
// if (ctx->enforcer == NULL)
// {
// goto error_out;
// }
// if (policy_enforcer_register(ctx->enforcer) == -1)
// {
// goto error_out;
// }
return ctx;
error_out:
@@ -107,6 +82,7 @@ void acceptor_ctx_destory(struct acceptor_ctx * ctx)
{
packet_io_destory(ctx->io);
tfe_tap_destory(ctx->config);
global_metrics_destory(ctx->metrics);
free(ctx);
ctx = NULL;