Skip to content
Snippets Groups Projects
Commit a194a3b1 authored by rswindell's avatar rswindell
Browse files

When writing to the global section of the sbbs.ini file, don't remove keys that

contain the default value as this makes the comments in the stock sbbs.ini
make no sense.
parent 65822b7b
No related branches found
No related tags found
No related merge requests found
......@@ -707,43 +707,14 @@ BOOL sbbs_write_ini(
if(global!=&global_buf) {
section = "Global";
if(global->ctrl_dir[0]==0)
iniRemoveKey(lp,section,strCtrlDirectory);
else
iniSetString(lp,section,strCtrlDirectory,global->ctrl_dir,&style);
if(global->temp_dir[0]==0)
iniRemoveKey(lp,section,strTempDirectory);
else
iniSetString(lp,section,strTempDirectory,global->temp_dir,&style);
if(global->host_name[0]==0)
iniRemoveKey(lp,section,strHostName);
else
iniSetString(lp,section,strHostName,global->host_name,&style);
if(global->sem_chk_freq==0)
iniRemoveKey(lp,section,strSemFileCheckFrequency);
else
iniSetShortInt(lp,section,strSemFileCheckFrequency,global->sem_chk_freq,&style);
if(global->interface_addr==INADDR_ANY)
iniRemoveKey(lp,section,strInterface);
else
iniSetIpAddress(lp,section,strInterface,global->interface_addr,&style);
if(global->log_level==DEFAULT_LOG_LEVEL)
iniRemoveKey(lp,section,strLogLevel);
else
iniSetLogLevel(lp,section,strLogLevel,global->log_level,&style);
if(global->bind_retry_count==DEFAULT_BIND_RETRY_COUNT)
iniRemoveKey(lp,section,strBindRetryCount);
else
iniSetInteger(lp,section,strBindRetryCount,global->bind_retry_count,&style);
if(global->bind_retry_delay==DEFAULT_BIND_RETRY_DELAY)
iniRemoveKey(lp,section,strBindRetryDelay);
else
iniSetInteger(lp,section,strBindRetryDelay,global->bind_retry_delay,&style);
iniSetString(lp,section,strCtrlDirectory,global->ctrl_dir,&style);
iniSetString(lp,section,strTempDirectory,global->temp_dir,&style);
iniSetString(lp,section,strHostName,global->host_name,&style);
iniSetShortInt(lp,section,strSemFileCheckFrequency,global->sem_chk_freq,&style);
iniSetIpAddress(lp,section,strInterface,global->interface_addr,&style);
iniSetLogLevel(lp,section,strLogLevel,global->log_level,&style);
iniSetInteger(lp,section,strBindRetryCount,global->bind_retry_count,&style);
iniSetInteger(lp,section,strBindRetryDelay,global->bind_retry_delay,&style);
iniSetInteger(lp,section,strLoginAttemptDelay,global->login_attempt_delay,&style);
iniSetInteger(lp,section,strLoginAttemptThrottle,global->login_attempt_throttle,&style);
iniSetInteger(lp,section,strLoginAttemptHackThreshold,global->login_attempt_hack_threshold,&style);
......
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