diff options
author | Łukasz Stelmach <l.stelmach@samsung.com> | 2018-09-19 12:04:50 +0200 |
---|---|---|
committer | Michal Bloch <m.bloch@partner.samsung.com> | 2020-04-15 13:41:49 +0200 |
commit | bc69508cfe6454c4aa5db0ee6ee6e152376bb6cc (patch) | |
tree | 4b3ec5438cdb6c0c83376cb743ca1a5df7fb988c | |
parent | 4b749ebb6c27a6d87435a5f7c6fd59388d5a09ad (diff) | |
download | resourced-tizen_4.0.tar.gz resourced-tizen_4.0.tar.bz2 resourced-tizen_4.0.zip |
Fail module logging initalization if logging_init() failstizen_4.0
This will probably prevent the whole module from initializing properly,
if it requires logging, but prevents the whole resourced from blowing up.
Change-Id: Ic7a544a1fe66402e20a4974f006c3d5fd09aa7af
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
-rw-r--r-- | src/heart/logging.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/heart/logging.c b/src/heart/logging.c index bf9134ca..f156c0bd 100644 --- a/src/heart/logging.c +++ b/src/heart/logging.c @@ -376,7 +376,13 @@ int logging_module_init(char *name, enum logging_period max_period, assert(logging_instance); logging_instance->ref = 0; - logging_init(NULL); + ret = logging_init(NULL); + if (ret != RESOURCED_ERROR_NONE) { + free(logging_instance); + logging_instance = NULL; + _E("failed to init logging"); + return ret; + } } logging_instance->ref++; |