| 21 |
#include "menu.h" |
#include "menu.h" |
| 22 |
#include <string.h> |
#include <string.h> |
| 23 |
#include <time.h> |
#include <time.h> |
| 24 |
|
#include <signal.h> |
| 25 |
#include <sys/types.h> |
#include <sys/types.h> |
| 26 |
|
|
| 27 |
// File loader |
// File loader |
| 37 |
VAR_BBS_TOP}; |
VAR_BBS_TOP}; |
| 38 |
int data_files_load_startup_count = 9; // Count of data_files_load_startup[] |
int data_files_load_startup_count = 9; // Count of data_files_load_startup[] |
| 39 |
|
|
|
const char *data_files_load_timeval[] = { |
|
|
VAR_BBS_TOP}; |
|
|
int data_files_load_timeval_count = 1; // Count of data_files_load_timeval[] |
|
|
|
|
| 40 |
// Global declaration for sockets |
// Global declaration for sockets |
| 41 |
int socket_server; |
int socket_server[2]; |
| 42 |
int socket_client; |
int socket_client; |
| 43 |
char hostaddr_server[50]; |
char hostaddr_client[IP_ADDR_LEN]; |
|
char hostaddr_client[50]; |
|
|
int port_server; |
|
| 44 |
int port_client; |
int port_client; |
| 45 |
|
|
| 46 |
// SSHv2 |
// SSHv2 |
| 47 |
int SSH_v2 = 0; |
int SSH_v2 = 0; |
| 48 |
|
ssh_bind sshbind; |
| 49 |
ssh_session SSH_session; |
ssh_session SSH_session; |
| 50 |
ssh_channel SSH_channel; |
ssh_channel SSH_channel; |
| 51 |
|
|
| 89 |
|
|
| 90 |
void sig_term_handler(int i) |
void sig_term_handler(int i) |
| 91 |
{ |
{ |
| 92 |
|
struct sigaction act = {0}; |
| 93 |
|
|
| 94 |
SYS_server_exit = 1; |
SYS_server_exit = 1; |
| 95 |
|
|
| 96 |
|
act.sa_handler = SIG_IGN; |
| 97 |
|
sigaction(SIGTERM, &act, NULL); |
| 98 |
} |
} |
| 99 |
|
|
| 100 |
void sig_chld_handler(int i) |
void sig_chld_handler(int i) |