Skip to content
Snippets Groups Projects
  • deuce's avatar
    dbbfabf1
    Update to 3.17a · dbbfabf1
    deuce authored
    New Features:
    - Multiple bindings for each service
      Use comma-separated interfaces on Interface= lines in the ini file.
      Default is now "0.0.0.0,::"
    - IPv6 support
    - TLS support for the webserver and (non-static) services
      New TLS option in services.ini (ie: Options=TLS)
    - Decrease LEN_SCAN_CMD to 35 chars, increase the CID field to 45 chars,
      and rename the MAIL_CMD string to IPADDR.  I think this frees up the
      note field for SysOp use.
    dbbfabf1
    History
    Update to 3.17a
    deuce authored
    New Features:
    - Multiple bindings for each service
      Use comma-separated interfaces on Interface= lines in the ini file.
      Default is now "0.0.0.0,::"
    - IPv6 support
    - TLS support for the webserver and (non-static) services
      New TLS option in services.ini (ie: Options=TLS)
    - Decrease LEN_SCAN_CMD to 35 chars, increase the CID field to 45 chars,
      and rename the MAIL_CMD string to IPADDR.  I think this frees up the
      note field for SysOp use.
getctrl.c 699 B
#include <gen_defs.h>
#include <dirwrap.h>

char *get_ctrl_dir(char *path, size_t pathsz)
{
#ifdef PREFIX
	char	ini_file[MAX_PATH];
#endif
	char *p;

	p=getenv("SBBSCTRL");
	if(p!=NULL) {
		strncpy(path, p, pathsz);
		if(pathsz > 0)
			path[pathsz-1]=0;
		return path;
	}

#ifdef PREFIX
	strncpy(path, PREFIX"/etc", pathsz);
	if(pathsz > 0)
		path[pathsz-1]=0;
	iniFileName(ini_file, sizeof(ini_file)-1, PREFIX"/etc", "sbbs.ini");
	if(fexistcase(ini_file)) {
		FILE*	fini;
		char*	str;

		fini=iniOpenFile(ini_file, FALSE);
		if(fini==NULL)
			return NULL;
		str = iniReadExistingString(fini, "Global", "CtrlDirectory", NULL, ini_file);
		iniCloseFile(fini);
		return str;
	}
#endif
	return NULL;
}