--- lbbs/src/net_server.c 2025/11/04 13:49:51 1.77 +++ lbbs/src/net_server.c 2025/11/07 04:58:09 1.80 @@ -3,11 +3,12 @@ * net_server * - network server with SSH support * - * Copyright (C) 2004-2025 by Leaflet + * Copyright (C) 2004-2025 Leaflet */ #include "bbs.h" #include "bbs_main.h" +#include "bwf.h" #include "common.h" #include "database.h" #include "file_loader.h" @@ -39,8 +40,13 @@ #include #include -#define WAIT_CHILD_PROCESS_EXIT_TIMEOUT 5 // second -#define WAIT_CHILD_PROCESS_KILL_TIMEOUT 1 // second +enum _net_server_constant_t +{ + WAIT_CHILD_PROCESS_EXIT_TIMEOUT = 5, // second + WAIT_CHILD_PROCESS_KILL_TIMEOUT = 1, // second + + SSH_AUTH_MAX_DURATION = 60 * 1000, // milliseconds +}; struct process_sockaddr_t { @@ -51,9 +57,7 @@ typedef struct process_sockaddr_t PROCES static PROCESS_SOCKADDR process_sockaddr_pool[MAX_CLIENT_LIMIT]; -#define SSH_AUTH_MAX_DURATION (60 * 1000) // milliseconds - -#define SFTP_SERVER_PATH "/usr/lib/sftp-server" +static const char SFTP_SERVER_PATH[] = "/usr/lib/sftp-server"; /* A userdata struct for session. */ struct session_data_struct @@ -650,6 +654,12 @@ int net_server(const char *hostaddr, in_ log_error("Reload conf failed\n"); } + // Reload BWF config + if (bwf_load(CONF_BWF) < 0) + { + log_error("Reload BWF conf failed\n"); + } + if (load_menu(&bbs_menu_new, CONF_MENU) < 0) { unload_menu(&bbs_menu_new);