Skip to content
Snippets Groups Projects
Commit 389b472f authored by Eric Vidal's avatar Eric Vidal :speech_balloon:
Browse files

control sanitize_source by flag

parent 4840769c
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
extern int sanitize_system(ssexec_t *info) ;
extern void sanitize_source(char const *name, ssexec_t *info) ;
extern void sanitize_source(char const *name, ssexec_t *info, uint32_t flag) ;
extern int sanitize_fdholder(resolve_service_t *res, ss_state_t *sta, uint32_t flag) ;
extern int sanitize_livestate(resolve_service_t *res, ss_state_t *sta) ;
extern int sanitize_scandir(resolve_service_t *res, ss_state_t *sta) ;
......
......@@ -83,7 +83,7 @@ int ssexec_enable(int argc, char const *const *argv, ssexec_t *info)
_init_stack_(stk, argc * SS_MAX_TREENAME) ;
for(; n < argc ; n++)
sanitize_source(argv[n], info) ;
sanitize_source(argv[n], info, flag) ;
/** build the graph of the entire system */
graph_build_service(&graph, ares, &areslen, info, flag) ;
......
......@@ -100,7 +100,7 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
if (!state_read(&sta, &ares[aresid]))
log_dieu(LOG_EXIT_SYS, "read state file of: ", argv[n]) ;
sta.isparsed = STATE_FLAGS_FALSE ;
sta.toparse = STATE_FLAGS_TRUE ;
if (!state_write(&sta, &ares[aresid]))
log_dieusys(LOG_EXIT_SYS, "write status file of: ", argv[n]) ;
......@@ -193,7 +193,7 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
/** force to parse again the service */
for (n = 0 ; n < argc ; n++)
sanitize_source(argv[n], info) ;
sanitize_source(argv[n], info, flag) ;
for (n = 0 ; n < ntostate ; n++) {
......@@ -201,14 +201,13 @@ int ssexec_reconfigure(int argc, char const *const *argv, ssexec_t *info)
* Reverse to the previous state of the isparsed flag. */
if (state_read_remote(&sta, ares[tostate[n]].sa.s + ares[tostate[n]].live.statedir)) {
sta.isparsed = STATE_FLAGS_TRUE ;
sta.toparse = STATE_FLAGS_FALSE ;
if (!state_write_remote(&sta, ares[tostate[n]].sa.s + ares[tostate[n]].live.statedir))
log_warnusys("write status file of: ", ares[tostate[n]].sa.s + ares[tostate[n]].live.statedir) ;
}
}
if (nservice && r) {
unsigned int m = 0 ;
......
......@@ -87,7 +87,7 @@ int ssexec_start(int argc, char const *const *argv, ssexec_t *info)
* or the later call of service_array_search does not find the corresponding
* resolve file in the second case.
* At least try to parse the corresponding frontend file. */
sanitize_source(argv[n], info) ;
sanitize_source(argv[n], info, flag) ;
/** build the graph of the entire system */
graph_build_service(&graph, ares, &areslen, info, flag) ;
......
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