Fixed: [Backend hangs when doing "process services restart" in the CLI](https://github.com/clicon/clixon-controller/issues/178)

This commit is contained in:
Olof hagsand 2025-01-17 13:53:44 +01:00
parent b7d91607b6
commit 271569b194
2 changed files with 9 additions and 2 deletions

View file

@ -48,6 +48,7 @@ Developers may need to change their code
### Corrected Bugs
* Fixed: [Backend hangs when doing "process services restart" in the CLI](https://github.com/clicon/clixon-controller/issues/178)
* Fixed: [Autocli: error when empty YANG group and grouping-treeref=true](https://github.com/clicon/clixon/issues/579)
* Fixed: [Mem error when more multiple uses on top level with multiple statements in grouping](https://github.com/clicon/clixon/issues/583)
* Fixed: [Change CLICON_NETCONF_DUPLICATE_ALLOW to remove duplicates](https://github.com/clicon/clixon-controller/issues/160)

View file

@ -340,8 +340,14 @@ clixon_log_str(int level,
/* Remove trailing CR if any */
if (strlen(msg) && msg[strlen(msg)-1] == '\n')
msg[strlen(msg)-1] = '\0';
if (_log_flags & CLIXON_LOG_SYSLOG)
syslog(LOG_MAKEPRI(LOG_USER, level), "%s", msg); // XXX this may block
if (_log_flags & CLIXON_LOG_SYSLOG){
static int _recurse = 0;
/* avoid mutex if called recursively */
if (_recurse++ == 0){
syslog(LOG_MAKEPRI(LOG_USER, level), "%s", msg);
_recurse = 0;
}
}
/* syslog makes own filtering, we do it here:
* if normal (not debug) then filter loglevels >= debug
*/