From 89211b8cc4038c768a1730061c19c09e1f977ddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=B5=AB=E7=84=B6?= Date: Wed, 13 Mar 2024 17:31:21 +0800 Subject: [PATCH] Delete unused option --- server/http-server.c | 64 ---------------------------------------- server/http-server.h | 4 --- server/seafile-session.c | 13 ++++++++ 3 files changed, 13 insertions(+), 68 deletions(-) diff --git a/server/http-server.c b/server/http-server.c index 75c147ea..77c137b6 100644 --- a/server/http-server.c +++ b/server/http-server.c @@ -150,11 +150,7 @@ load_http_config (HttpServerStruct *htp_server, SeafileSession *session) char *host = NULL; int port = 0; int worker_threads; - int web_token_expire_time; - int fixed_block_size_mb; char *encoding; - int max_indexing_threads; - int max_index_processing_threads; char *cluster_shared_temp_file_mode = NULL; host = fileserver_config_get_string (session->config, HOST, &error); @@ -198,66 +194,6 @@ load_http_config (HttpServerStruct *htp_server, SeafileSession *session) } seaf_message ("fileserver: worker_threads = %d\n", htp_server->worker_threads); - fixed_block_size_mb = fileserver_config_get_integer (session->config, - "fixed_block_size", - &error); - if (error){ - htp_server->fixed_block_size = DEFAULT_FIXED_BLOCK_SIZE; - g_clear_error(&error); - } else { - if (fixed_block_size_mb <= 0) - htp_server->fixed_block_size = DEFAULT_FIXED_BLOCK_SIZE; - else - htp_server->fixed_block_size = fixed_block_size_mb * ((gint64)1 << 20); - } - seaf_message ("fileserver: fixed_block_size = %"G_GINT64_FORMAT"\n", - htp_server->fixed_block_size); - - web_token_expire_time = fileserver_config_get_integer (session->config, - "web_token_expire_time", - &error); - if (error){ - htp_server->web_token_expire_time = 3600; /* default 3600s */ - g_clear_error(&error); - } else { - if (web_token_expire_time <= 0) - htp_server->web_token_expire_time = 3600; /* default 3600s */ - else - htp_server->web_token_expire_time = web_token_expire_time; - } - seaf_message ("fileserver: web_token_expire_time = %d\n", - htp_server->web_token_expire_time); - - max_indexing_threads = fileserver_config_get_integer (session->config, - "max_indexing_threads", - &error); - if (error) { - htp_server->max_indexing_threads = DEFAULT_MAX_INDEXING_THREADS; - g_clear_error (&error); - } else { - if (max_indexing_threads <= 0) - htp_server->max_indexing_threads = DEFAULT_MAX_INDEXING_THREADS; - else - htp_server->max_indexing_threads = max_indexing_threads; - } - seaf_message ("fileserver: max_indexing_threads = %d\n", - htp_server->max_indexing_threads); - - max_index_processing_threads = fileserver_config_get_integer (session->config, - "max_index_processing_threads", - &error); - if (error) { - htp_server->max_index_processing_threads = DEFAULT_MAX_INDEX_PROCESSING_THREADS; - g_clear_error (&error); - } else { - if (max_index_processing_threads <= 0) - htp_server->max_index_processing_threads = DEFAULT_MAX_INDEX_PROCESSING_THREADS; - else - htp_server->max_index_processing_threads = max_index_processing_threads; - } - seaf_message ("fileserver: max_index_processing_threads= %d\n", - htp_server->max_index_processing_threads); - cluster_shared_temp_file_mode = fileserver_config_get_string (session->config, "cluster_shared_temp_file_mode", &error); diff --git a/server/http-server.h b/server/http-server.h index 24331b46..bcff4e56 100644 --- a/server/http-server.h +++ b/server/http-server.h @@ -17,11 +17,7 @@ struct _HttpServerStruct { int bind_port; char *http_temp_dir; /* temp dir for file upload */ char *windows_encoding; - gint64 fixed_block_size; - int web_token_expire_time; - int max_indexing_threads; int worker_threads; - int max_index_processing_threads; int cluster_shared_temp_file_mode; }; diff --git a/server/seafile-session.c b/server/seafile-session.c index 126fd22e..ee8c0751 100644 --- a/server/seafile-session.c +++ b/server/seafile-session.c @@ -61,6 +61,9 @@ load_fileserver_config (SeafileSession *session) session->web_token_expire_time = web_token_expire_time; } + seaf_message ("fileserver: web_token_expire_time = %d\n", + session->web_token_expire_time); + max_index_processing_threads = g_key_file_get_integer (session->config, "fileserver", "max_index_processing_threads", NULL); @@ -70,6 +73,10 @@ load_fileserver_config (SeafileSession *session) session->max_index_processing_threads = max_index_processing_threads; } + seaf_message ("fileserver: max_index_processing_threads= %d\n", + session->max_index_processing_threads); + + fixed_block_size_mb = g_key_file_get_integer (session->config, "fileserver", "fixed_block_size", NULL); @@ -79,6 +86,9 @@ load_fileserver_config (SeafileSession *session) session->fixed_block_size = fixed_block_size_mb * ((gint64)1 << 20); } + seaf_message ("fileserver: fixed_block_size = %"G_GINT64_FORMAT"\n", + session->fixed_block_size); + max_indexing_threads = g_key_file_get_integer (session->config, "fileserver", "max_indexing_threads", NULL); @@ -88,6 +98,9 @@ load_fileserver_config (SeafileSession *session) session->max_indexing_threads = max_indexing_threads; } + seaf_message ("fileserver: max_indexing_threads = %d\n", + session->max_indexing_threads); + return; }