Commit 6b38defa authored by deuce's avatar deuce
Browse files

Overhauled web server. Squashed some memory leaks, more intelligent

JS initialization, supports four different index files and ten CGI
extensions.(in sbbs.ini)

ACTUALLY WORKS!
parent 96cef950
......@@ -377,11 +377,40 @@ void sbbs_read_ini(
SAFECOPY(web->error_dir
,iniReadString(fp,section,"ErrorDirectory","../html/error"));
SAFECOPY(web->index_file_name
,iniReadString(fp,section,"IndexFileName","index.html"));
SAFECOPY(web->js_ext
SAFECOPY(web->index_file_name[0]
,iniReadString(fp,section,"IndexFileName1","index.html"));
SAFECOPY(web->index_file_name[1]
,iniReadString(fp,section,"IndexFileName2","index.ssjs"));
SAFECOPY(web->index_file_name[2]
,iniReadString(fp,section,"IndexFileName3",""));
SAFECOPY(web->index_file_name[3]
,iniReadString(fp,section,"IndexFileName4",""));
SAFECOPY(web->cgi_ext[0]
,iniReadString(fp,section,"CGIScriptExtension1",".cgi"));
SAFECOPY(web->cgi_ext[1]
,iniReadString(fp,section,"CGIScriptExtension2",""));
SAFECOPY(web->cgi_ext[2]
,iniReadString(fp,section,"CGIScriptExtension3",""));
SAFECOPY(web->cgi_ext[3]
,iniReadString(fp,section,"CGIScriptExtension4",""));
SAFECOPY(web->cgi_ext[4]
,iniReadString(fp,section,"CGIScriptExtension5",""));
SAFECOPY(web->cgi_ext[5]
,iniReadString(fp,section,"CGIScriptExtension6",""));
SAFECOPY(web->cgi_ext[6]
,iniReadString(fp,section,"CGIScriptExtension7",""));
SAFECOPY(web->cgi_ext[7]
,iniReadString(fp,section,"CGIScriptExtension8",""));
SAFECOPY(web->cgi_ext[8]
,iniReadString(fp,section,"CGIScriptExtension9",""));
SAFECOPY(web->cgi_ext[9]
,iniReadString(fp,section,"CGIScriptExtension10",""));
SAFECOPY(web->ssjs_ext
,iniReadString(fp,section,"JavaScriptExtension",".ssjs"));
SAFECOPY(web->index_file_name
,iniReadString(fp,section,"IndexFileName1","index.html"));
web->max_inactivity
=iniReadShortInt(fp,section,"MaxInactivity",120); /* seconds */
web->max_cgi_inactivity
......
This diff is collapsed.
......@@ -71,18 +71,15 @@ typedef struct {
void (*reserved_fptr3)(void);
void (*reserved_fptr2)(void);
void (*reserved_fptr1)(void);
char index_file_name[64];
char js_ext[16]; /* Server-Side JavaScript file extension */
char reserved_str4[16];
char reserved_str3[32];
char reserved_str2[64];
char reserved_str1[64];
char reserved_filename[64];
char ssjs_ext[16]; /* Server-Side JavaScript file extension */
char js_ext[16]; /* Embedded JavaScript file extension */
char cgi_ext[10][16]; /* CGI Extensions */
char ctrl_dir[128];
char root_dir[128];
char error_dir[128];
char cgi_temp_dir[128];
char reserved_path7[128];
char reserved_path6[128];
char index_file_name[4][128];
char reserved_path5[128];
char reserved_path4[128];
char reserved_path3[128];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment