Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit bb871e6f authored by rswindell's avatar rswindell

Created refresh_cfg() function (previously called rerun_nodes in scfg.c).

parent 5e788ea5
...@@ -811,6 +811,7 @@ extern "C" { ...@@ -811,6 +811,7 @@ extern "C" {
DLLEXPORT BOOL DLLCALL write_chat_cfg(scfg_t* cfg, int backup_level); DLLEXPORT BOOL DLLCALL write_chat_cfg(scfg_t* cfg, int backup_level);
DLLEXPORT BOOL DLLCALL write_xtrn_cfg(scfg_t* cfg, int backup_level); DLLEXPORT BOOL DLLCALL write_xtrn_cfg(scfg_t* cfg, int backup_level);
DLLEXPORT void DLLCALL backup(char *org, int backup_level, BOOL ren); DLLEXPORT void DLLCALL backup(char *org, int backup_level, BOOL ren);
DLLEXPORT void DLLCALL refresh_cfg(scfg_t* cfg);
/* scfglib1.c */ /* scfglib1.c */
DLLEXPORT char * DLLCALL prep_dir(char* base, char* dir); DLLEXPORT char * DLLCALL prep_dir(char* base, char* dir);
......
...@@ -1059,3 +1059,28 @@ BOOL DLLCALL write_xtrn_cfg(scfg_t* cfg, int backup_level) ...@@ -1059,3 +1059,28 @@ BOOL DLLCALL write_xtrn_cfg(scfg_t* cfg, int backup_level)
return(TRUE); return(TRUE);
} }
void DLLCALL refresh_cfg(scfg_t* cfg)
{
char str[MAX_PATH+1];
int i;
int file;
node_t node;
for(i=0;i<cfg->sys_nodes;i++) {
if(getnodedat(cfg,i+1,&node,&file))
break;
node.misc|=NODE_RRUN;
if(putnodedat(cfg,i+1,&node,file))
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);
}
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