Skip to content

Commit

Permalink
Delete unused option
Browse files Browse the repository at this point in the history
  • Loading branch information
杨赫然 committed Mar 13, 2024
1 parent e0ee240 commit 89211b8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 68 deletions.
64 changes: 0 additions & 64 deletions server/http-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 0 additions & 4 deletions server/http-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
13 changes: 13 additions & 0 deletions server/seafile-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
Expand All @@ -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;
}

Expand Down

0 comments on commit 89211b8

Please sign in to comment.