mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
eliminate the need for a worker_pool variable in main_server_st.
This commit is contained in:
12
src/main.c
12
src/main.c
@@ -786,7 +786,6 @@ unsigned total = 10;
|
||||
clear_lists(s);
|
||||
tls_global_deinit(s->creds);
|
||||
clear_cfg_file(&s->config);
|
||||
talloc_free(s->worker_pool);
|
||||
talloc_free(s->main_pool);
|
||||
closelog();
|
||||
exit(0);
|
||||
@@ -845,15 +844,15 @@ int main(int argc, char** argv)
|
||||
|
||||
memset(&creds, 0, sizeof(creds));
|
||||
|
||||
worker_pool = talloc_init("worker");
|
||||
if (worker_pool == NULL) {
|
||||
/* main pool */
|
||||
main_pool = talloc_init("main");
|
||||
if (main_pool == NULL) {
|
||||
fprintf(stderr, "talloc init error\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* main pool */
|
||||
main_pool = talloc_init("main");
|
||||
if (main_pool == NULL) {
|
||||
worker_pool = talloc_named(main_pool, 0, "worker", NULL);
|
||||
if (worker_pool == NULL) {
|
||||
fprintf(stderr, "talloc init error\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -870,7 +869,6 @@ int main(int argc, char** argv)
|
||||
exit(1);
|
||||
}
|
||||
s->main_pool = main_pool;
|
||||
s->worker_pool = worker_pool;
|
||||
s->creds = &creds;
|
||||
s->start_time = time(0);
|
||||
|
||||
|
||||
@@ -190,7 +190,6 @@ typedef struct main_server_st {
|
||||
int ctl_fd;
|
||||
#endif
|
||||
void *main_pool; /* talloc main pool */
|
||||
void *worker_pool; /* talloc worker pool */
|
||||
} main_server_st;
|
||||
|
||||
void clear_lists(main_server_st *s);
|
||||
|
||||
Reference in New Issue
Block a user