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

Update refresh_cfg() to use SAFEPRINTF, ftouch, and the newer server recycle

semaphore file names (e.g. reyclce.ftp instead of ftpsrvr.rec).
Bug-fix: recycle the web server too (doh!).
parent a24a07ca
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2006 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -1124,13 +1124,8 @@ void DLLCALL refresh_cfg(scfg_t* cfg)
break;
}
sprintf(str,"%sftpsrvr.rec",cfg->ctrl_dir);
if((file=open(str,O_WRONLY|O_CREAT|O_TRUNC,S_IWRITE|S_IREAD))!=-1)
close(file);
sprintf(str,"%smailsrvr.rec",cfg->ctrl_dir);
if((file=open(str,O_WRONLY|O_CREAT|O_TRUNC,S_IWRITE|S_IREAD))!=-1)
close(file);
sprintf(str,"%sservices.rec",cfg->ctrl_dir);
if((file=open(str,O_WRONLY|O_CREAT|O_TRUNC,S_IWRITE|S_IREAD))!=-1)
close(file);
SAFEPRINTF(str,"%srecycle.ftp",cfg->ctrl_dir); ftouch(str);
SAFEPRINTF(str,"%srecycle.web",cfg->ctrl_dir); ftouch(str);
SAFEPRINTF(str,"%srecycle.mail",cfg->ctrl_dir); ftouch(str);
SAFEPRINTF(str,"%srecycle.services",cfg->ctrl_dir); ftouch(str);
}
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