pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/41970?usp=email ) Change subject: logging_file: Avoid reopning file for stderr ...................................................................... logging_file: Avoid reopning file for stderr target->tgt_file.fname is NULL for stderr log target. Change-Id: I4a551b0c434c480e78852a0a4873700eac2f5853 --- M src/core/logging_file.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/41970/1 diff --git a/src/core/logging_file.c b/src/core/logging_file.c index a9a1cb7..6e01c26 100644 --- a/src/core/logging_file.c +++ b/src/core/logging_file.c @@ -55,6 +55,9 @@ OSMO_ASSERT(target->type == LOG_TGT_TYPE_FILE || target->type == LOG_TGT_TYPE_STDERR); OSMO_ASSERT(target->tgt_file.out || target->tgt_file.wqueue); + if (target->type == LOG_TGT_TYPE_STDERR) + return -ENOTSUP; + if (target->tgt_file.out) { fclose(target->tgt_file.out); target->tgt_file.out = fopen(target->tgt_file.fname, "a"); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41970?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I4a551b0c434c480e78852a0a4873700eac2f5853 Gerrit-Change-Number: 41970 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de>