diff options
author | Łukasz Stelmach <l.stelmach@samsung.com> | 2018-09-19 12:04:50 +0200 |
---|---|---|
committer | Łukasz Stelmach <l.stelmach@samsung.com> | 2018-09-19 13:28:54 +0200 |
commit | a3bb1e1e1085dd789137d63c8fa54cd4f6a325cf (patch) | |
tree | 8dc5ad86484c2e5f340cbd2ce328fd53a6597073 | |
parent | 381c327cec73fd059aaa3fc6efb9d141606d4995 (diff) | |
download | resourced-accepted/tizen_5.0_unified.tar.gz resourced-accepted/tizen_5.0_unified.tar.bz2 resourced-accepted/tizen_5.0_unified.zip |
Fail module logging initalization if logging_init() failssubmit/tizen_5.0/20181101.000004submit/tizen/20180920.072124accepted/tizen/unified/20180920.155224accepted/tizen/5.0/unified/20181102.021616accepted/tizen_5.0_unified
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 0fc03ebc..27db3ed0 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++; |