Commit 024a694c authored by rswindell's avatar rswindell
Browse files

Converted hard-coded .LOG filenames to lowercase for Unix compatibility.

parent d9232dfe
......@@ -1557,7 +1557,7 @@ void sbbs_t::guruchat(char *line, char *gurubuf, int gurunum)
bprintf(text[ChatLineFmt],cfg.guru[gurunum]->name
,cfg.sys_nodes+1,':',theanswer); }
CRLF;
sprintf(str,"%sGURU.LOG",cfg.data_dir);
sprintf(str,"%sguru.log",cfg.data_dir);
if((file=nopen(str,O_WRONLY|O_CREAT|O_APPEND))==-1)
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_APPEND);
else {
......
......@@ -479,7 +479,7 @@ int sbbs_t::exec_function(csi_t *csi)
tm=gmtime(&now);
if(tm==NULL)
return(0);
sprintf(str,"%slogs/%2.2d%2.2d%2.2d.LOG", cfg.data_dir
sprintf(str,"%slogs/%2.2d%2.2d%2.2d.log", cfg.data_dir
,tm->tm_mon+1,tm->tm_mday,TM_YEAR(tm->tm_year));
printfile(str,0);
return(0);
......@@ -490,7 +490,7 @@ int sbbs_t::exec_function(csi_t *csi)
tm=gmtime(&now);
if(tm==NULL)
return(0);
sprintf(str,"%slogs/%2.2d%2.2d%2.2d.LOG",cfg.data_dir
sprintf(str,"%slogs/%2.2d%2.2d%2.2d.log",cfg.data_dir
,tm->tm_mon+1,tm->tm_mday,TM_YEAR(tm->tm_year));
printfile(str,0);
return(0);
......@@ -571,7 +571,7 @@ int sbbs_t::exec_function(csi_t *csi)
#endif
return(0);
case CS_ERROR_LOG:
sprintf(str,"%sERROR.LOG", cfg.data_dir);
sprintf(str,"%serror.log", cfg.data_dir);
if(fexist(str)) {
bputs(text[ErrorLogHdr]);
printfile(str,0);
......@@ -611,7 +611,7 @@ int sbbs_t::exec_function(csi_t *csi)
editfile(str);
return(0);
case CS_GURU_LOG:
sprintf(str,"%sGURU.LOG", cfg.data_dir);
sprintf(str,"%sguru.log", cfg.data_dir);
if(fexist(str)) {
printfile(str,0);
CRLF;
......
......@@ -921,7 +921,7 @@ void sbbs_t::errorlog(char *text)
}
now=time(NULL);
logline("!!",text);
sprintf(str,"%sERROR.LOG",cfg.data_dir);
sprintf(str,"%serror.log",cfg.data_dir);
if((file=nopen(str,O_WRONLY|O_CREAT|O_APPEND))==-1) {
sprintf(tmp2,"ERROR opening/creating %s",str);
logline("!!",tmp2);
......
......@@ -396,7 +396,7 @@ void sbbs_t::xtrndat(char *name, char *dropdir, uchar type, ulong tleft
,tleft /* Time left in seconds */
,cfg.node_dir /* Gfiles dir (log dir) */
,cfg.data_dir /* Data dir */
,"NODE.LOG" /* Name of log file */
,"node.log" /* Name of log file */
,dte_rate /* DTE rate */
,cfg.com_port /* COM port number */
,cfg.sys_name /* System name */
......@@ -1459,7 +1459,7 @@ void sbbs_t::exec_xtrn(uint xtrnnum)
,mode&~EX_INR, cfg.xtrn[xtrnnum]->path); }
/* Re-open the logfile */
if(logfile_fp==NULL) {
sprintf(str,"%sNODE.LOG",cfg.node_dir);
sprintf(str,"%snode.log",cfg.node_dir);
if((logfile_fp=fopen(str,"a+b"))==NULL)
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_APPEND);
}
......@@ -1474,7 +1474,7 @@ void sbbs_t::exec_xtrn(uint xtrnnum)
if(online==ON_REMOTE) {
checkline();
if(!online) {
sprintf(str,"%sHUNGUP.LOG",cfg.data_dir);
sprintf(str,"%shungup.log",cfg.data_dir);
if((file=nopen(str,O_WRONLY|O_CREAT|O_APPEND))==-1) {
errormsg(WHERE,ERR_OPEN,str,O_WRONLY|O_CREAT|O_APPEND);
return; }
......
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