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

do not deal with unsupervised service on stop process

parent a303aad5
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,8 @@ void sanitize_source(char const *name, ssexec_t *info)
{
log_flow() ;
int r, logname = get_rstrlen_until(name,SS_LOG_SUFFIX) ;
int r ;
ssize_t logname = get_rstrlen_until(name,SS_LOG_SUFFIX) ;
char atree[SS_MAX_TREENAME + 1] ;
r = service_is_g(atree, name, STATE_FLAGS_ISPARSED) ;
......
......@@ -67,6 +67,7 @@ void service_graph_build(graph_t *g, resolve_service_t *ares, unsigned int aresl
log_flow() ;
unsigned int pos = 0 ;
ss_state_t ste = STATE_ZERO ;
resolve_service_t_ref pres = 0 ;
for (; pos < areslen ; pos++) {
......@@ -74,6 +75,17 @@ void service_graph_build(graph_t *g, resolve_service_t *ares, unsigned int aresl
pres = &ares[pos] ;
char *service = pres->sa.s + pres->name ;
if (!state_check(&ares[pos]))
continue ;
if (!state_read(&ste, &ares[pos]))
continue ;
if (service_is(&ste, STATE_FLAGS_ISSUPERVISED) == STATE_FLAGS_FALSE && FLAGS_ISSET(flag, STATE_FLAGS_ISSUPERVISED)) {
log_warn("service: ", service, " not available -- ignore it") ;
continue ;
}
if (!graph_vertex_add(g, service))
log_dieu(LOG_EXIT_SYS, "add vertex: ", service) ;
......
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