Update session timeouts
This commit is contained in:
@@ -48,10 +48,10 @@ struct stellar_context stellar_context;
|
||||
struct stellar_context *stellar_ctx = &stellar_context;
|
||||
|
||||
// config
|
||||
struct device_options *dev_opts = &stellar_context.config.dev_opts;
|
||||
struct packet_io_options *pkt_io_opts = &stellar_context.config.pkt_io_opts;
|
||||
struct ip_reassembly_options *ip_reass_opts = &stellar_context.config.ip_reass_opts;
|
||||
struct session_manager_options *sess_mgr_opts = &stellar_context.config.sess_mgr_opts;
|
||||
struct device_options *device_opts = &stellar_context.config.device_opts;
|
||||
struct packet_io_options *packet_io_opts = &stellar_context.config.packet_io_opts;
|
||||
struct ip_reassembly_options *ip_reassembly_opts = &stellar_context.config.ip_reassembly_opts;
|
||||
struct session_manager_options *session_manager_opts = &stellar_context.config.session_manager_opts;
|
||||
|
||||
static const char *log_config_file = "./conf/log.toml";
|
||||
static const char *stellar_config_file = "./conf/stellar.toml";
|
||||
@@ -291,14 +291,14 @@ static int thread_context_init(struct stellar_context *ctx, uint8_t nr_threads)
|
||||
threads_ctx->need_exit = 0;
|
||||
threads_ctx->is_runing = 0;
|
||||
|
||||
threads_ctx->sess_mgr = session_manager_new(sess_mgr_opts, now);
|
||||
threads_ctx->sess_mgr = session_manager_new(session_manager_opts, now);
|
||||
if (threads_ctx->sess_mgr == NULL)
|
||||
{
|
||||
STELLAR_LOG_ERROR("unable to create session manager");
|
||||
return -1;
|
||||
}
|
||||
|
||||
threads_ctx->ip_mgr = ip_reassembly_new(ip_reass_opts);
|
||||
threads_ctx->ip_mgr = ip_reassembly_new(ip_reassembly_opts);
|
||||
if (threads_ctx->ip_mgr == NULL)
|
||||
{
|
||||
STELLAR_LOG_ERROR("unable to create ip reassemble manager");
|
||||
@@ -382,7 +382,7 @@ int main(int argc, char **argv)
|
||||
|
||||
print_config_options(&stellar_ctx->config);
|
||||
|
||||
if (id_generator_init(dev_opts->device_base, dev_opts->device_offset) != 0)
|
||||
if (id_generator_init(device_opts->device_base, device_opts->device_offset) != 0)
|
||||
{
|
||||
STELLAR_LOG_ERROR("unable to init id generator");
|
||||
return -1;
|
||||
@@ -390,8 +390,8 @@ int main(int argc, char **argv)
|
||||
|
||||
// TODO load plugin
|
||||
|
||||
uint8_t nr_threads = pkt_io_opts->nr_threads;
|
||||
stellar_ctx->packet_io = packet_io_new(pkt_io_opts);
|
||||
uint8_t nr_threads = packet_io_opts->nr_threads;
|
||||
stellar_ctx->packet_io = packet_io_new(packet_io_opts);
|
||||
if (stellar_ctx->packet_io == NULL)
|
||||
{
|
||||
STELLAR_LOG_ERROR("unable to create packet io");
|
||||
|
||||
Reference in New Issue
Block a user