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

do not output warn message at configuration file content display

parent 57859c3a
No related branches found
No related tags found
No related merge requests found
......@@ -621,6 +621,7 @@ static void info_display_envfile(char const *field,ss_resolve_t *res)
FOREACH_SASTR(&list,pos) {
ssize_t upstream = 0 ;
sa.len = 0 ;
salink.len = newlen ;
if (!stralloc_cats(&salink,"/") ||
......@@ -630,8 +631,25 @@ static void info_display_envfile(char const *field,ss_resolve_t *res)
if (!file_readputsa_g(&sa,salink.s))
log_dieusys(LOG_EXIT_SYS,"read environment file") ;
if (NOFIELD) {
/** Remove warning message */
if (list.s[pos] == '.') {
char t[sa.len + 1] ;
upstream = str_contain(sa.s,"[ENDWARN]") ;
if (upstream == -1)
log_die(LOG_EXIT_SYS,"invalid upstream configuration file! Do you have modified it? Tries to enable the service again.") ;
auto_strings(t,sa.s + upstream) ;
sa.len = 0 ;
if (!auto_stra(&sa,t))
log_die_nomem("stralloc") ;
}
if (NOFIELD) {
char *m = "environment variables from: " ;
size_t mlen = strlen(m) ;
......@@ -640,6 +658,7 @@ static void info_display_envfile(char const *field,ss_resolve_t *res)
if (!stralloc_inserts(&sa,0,msg) ||
!stralloc_0(&sa))
log_die_nomem("stralloc") ;
}
if (pos)
......
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