Skip to content
Snippets Groups Projects
Commit 9c763790 authored by deuce's avatar deuce
Browse files

Add bind_retry_count and bind_retry_delay uints to the startup scructs... set

by BindRetrycount and BindRetryDelay keys in the ini file.

Will control the number of times/delay between attempted calls to bind()
before the thread packs up and goes home.
parent c934240c
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,8 @@ typedef struct {
BOOL recycle_now;
sem_t recycle_sem;
DWORD log_mask;
uint bind_retry_count; /* Number of times to retry bind() calls */
uint bind_retry_delay; /* Time to wait between each bind() retry */
} ftp_startup_t;
......
......@@ -90,6 +90,8 @@ typedef struct {
BOOL recycle_now;
sem_t recycle_sem;
DWORD log_mask;
uint bind_retry_count; /* Number of times to retry bind() calls */
uint bind_retry_delay; /* Time to wait between each bind() retry */
/* Relay Server */
char relay_server[128];
......
......@@ -102,6 +102,8 @@ static void read_ini_globals(FILE* fp, global_startup_t* global)
global->sem_chk_freq=iniReadShortInt(fp,section,strSemFileCheckFrequency,0);
global->interface_addr=iniReadIpAddress(fp,section,strInterface,INADDR_ANY);
global->log_mask=iniReadBitField(fp,section,strLogMask,log_mask_bits,DEFAULT_LOG_MASK);
global->bind_retry_count=iniReadInteger(fp,section,"BindRetryCount",10);
global->bind_retry_delay=iniReadInteger(fp,section,"BindRetryDelay",15);
global->js.max_bytes = iniReadInteger(fp,section,strJavaScriptMaxBytes ,JAVASCRIPT_MAX_BYTES);
global->js.cx_stack = iniReadInteger(fp,section,strJavaScriptContextStack ,JAVASCRIPT_CONTEXT_STACK);
......@@ -231,6 +233,9 @@ void sbbs_read_ini(
bbs->options
=iniReadBitField(fp,section,strOptions,bbs_options
,BBS_OPT_XTRN_MINIMIZED|BBS_OPT_SYSOP_AVAILABLE);
bbs->bind_retry_count=iniReadInteger(fp,section,"BindRetryCount",global->bind_retry_count);
bbs->bind_retry_delay=iniReadInteger(fp,section,"BindRetryDelay",global->bind_retry_delay);
}
/***********************************************************************/
......@@ -282,6 +287,9 @@ void sbbs_read_ini(
ftp->options
=iniReadBitField(fp,section,strOptions,ftp_options
,FTP_OPT_INDEX_FILE|FTP_OPT_HTML_INDEX_FILE|FTP_OPT_ALLOW_QWK);
ftp->bind_retry_count=iniReadInteger(fp,section,"BindRetryCount",global->bind_retry_count);
ftp->bind_retry_delay=iniReadInteger(fp,section,"BindRetryDelay",global->bind_retry_delay);
}
/***********************************************************************/
......@@ -356,6 +364,9 @@ void sbbs_read_ini(
mail->options
=iniReadBitField(fp,section,strOptions,mail_options
,MAIL_OPT_ALLOW_POP3);
mail->bind_retry_count=iniReadInteger(fp,section,"BindRetryCount",global->bind_retry_count);
mail->bind_retry_delay=iniReadInteger(fp,section,"BindRetryDelay",global->bind_retry_delay);
}
/***********************************************************************/
......@@ -397,6 +408,9 @@ void sbbs_read_ini(
services->options
=iniReadBitField(fp,section,strOptions,service_options
,BBS_OPT_NO_HOST_LOOKUP);
services->bind_retry_count=iniReadInteger(fp,section,"BindRetryCount",global->bind_retry_count);
services->bind_retry_delay=iniReadInteger(fp,section,"BindRetryDelay",global->bind_retry_delay);
}
/***********************************************************************/
......@@ -458,6 +472,9 @@ void sbbs_read_ini(
web->options
=iniReadBitField(fp,section,strOptions,web_options
,BBS_OPT_NO_HOST_LOOKUP | WEB_OPT_HTTP_LOGGING);
web->bind_retry_count=iniReadInteger(fp,section,"BindRetryCount",global->bind_retry_count);
web->bind_retry_delay=iniReadInteger(fp,section,"BindRetryDelay",global->bind_retry_delay);
}
}
......@@ -592,6 +609,11 @@ BOOL sbbs_write_ini(
if(!iniSetBitField(lp,section,strOptions,bbs_options,bbs->options,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryCount",bbs->bind_retry_count,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryDelay",bbs->bind_retry_delay,&style))
break;
}
/***********************************************************************/
if(ftp!=NULL) {
......@@ -659,6 +681,11 @@ BOOL sbbs_write_ini(
if(!iniSetBitField(lp,section,strOptions,ftp_options,ftp->options,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryCount",ftp->bind_retry_count,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryDelay",ftp->bind_retry_delay,&style))
break;
}
/***********************************************************************/
......@@ -749,6 +776,11 @@ BOOL sbbs_write_ini(
if(!iniSetBitField(lp,section,strOptions,mail_options,mail->options,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryCount",mail->bind_retry_count,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryDelay",mail->bind_retry_delay,&style))
break;
}
/***********************************************************************/
......@@ -813,6 +845,11 @@ BOOL sbbs_write_ini(
if(!iniSetBitField(lp,section,strOptions,service_options,services->options,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryCount",services->bind_retry_count,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryDelay",services->bind_retry_delay,&style))
break;
}
/***********************************************************************/
......@@ -883,6 +920,11 @@ BOOL sbbs_write_ini(
if(!iniSetBitField(lp,section,strOptions,web_options,web->options,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryCount",web->bind_retry_count,&style))
break;
if(!iniSetInteger(lp,section,"BindRetryDelay",web->bind_retry_delay,&style))
break;
}
/***********************************************************************/
......
......@@ -77,6 +77,8 @@ typedef struct {
BOOL recycle_now;
sem_t recycle_sem;
DWORD log_mask;
uint bind_retry_count; /* Number of times to retry bind() calls */
uint bind_retry_delay; /* Time to wait between each bind() retry */
} services_startup_t;
......
......@@ -62,6 +62,8 @@ typedef struct {
ulong interface_addr;
ulong log_mask;
js_startup_t js;
uint bind_retry_count; /* Number of times to retry bind() calls */
uint bind_retry_delay; /* Time to wait between each bind() retry */
} global_startup_t;
......@@ -118,6 +120,8 @@ typedef struct {
BOOL recycle_now;
sem_t recycle_sem;
DWORD log_mask;
uint bind_retry_count; /* Number of times to retry bind() calls */
uint bind_retry_delay; /* Time to wait between each bind() retry */
} bbs_startup_t;
......
......@@ -86,6 +86,8 @@ typedef struct {
BOOL recycle_now;
sem_t recycle_sem;
DWORD log_mask;
uint bind_retry_count; /* Number of times to retry bind() calls */
uint bind_retry_delay; /* Time to wait between each bind() retry */
} web_startup_t;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment