Skip to content
Snippets Groups Projects
Commit c0102a33 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Move the configuration shell checking to the terminal server

Loading empty main.ini file results in no (0) command shells be configured, but this scenario needs to be supported if we are to be able to run upgrade_to_v320.js via jsexec when there is no ctrl/main.ini file.

Only the terminal server cares about command shells, so just move the checking and critical-error reporting there.
parent c0abcd62
No related branches found
No related tags found
No related merge requests found
......@@ -4942,6 +4942,12 @@ void bbs_thread(void* arg)
return;
}
if(scfg.total_shells < 1) {
lprintf(LOG_CRIT, "At least one command shell must be configured (e.g. in SCFG->Command Shells)");
cleanup(1);
return;
}
if((t=checktime())!=0) { /* Check binary time */
lprintf(LOG_ERR,"!TIME PROBLEM (%ld)",t);
}
......
......@@ -264,12 +264,6 @@ BOOL read_main_cfg(scfg_t* cfg, char* error, size_t maxerrlen)
str_list_t shell_list = iniGetParsedSectionList(sections, "shell:");
cfg->total_shells = (uint16_t)strListCount(shell_list);
#ifdef SBBS
if(!cfg->total_shells) {
safe_snprintf(error, maxerrlen,"At least one command shell must be configured.");
return(FALSE);
}
#endif
if(cfg->total_shells) {
if((cfg->shell=(shell_t **)malloc(sizeof(shell_t *)*cfg->total_shells))==NULL)
......
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