summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2019-02-07 06:52:55 (GMT)
committerHwankyu Jhun <h.jhun@samsung.com>2019-02-07 07:09:04 (GMT)
commit2847d3376f856d9e68fd3cc6338dd1b420f2431b (patch)
tree52d5277c8a326dff834adccce09a20b7e81dd730
parentd4e197480ef12dc1bce7bc99a3c32b683b720996 (diff)
downloadalarm-manager-2847d3376f856d9e68fd3cc6338dd1b420f2431b.zip
alarm-manager-2847d3376f856d9e68fd3cc6338dd1b420f2431b.tar.gz
alarm-manager-2847d3376f856d9e68fd3cc6338dd1b420f2431b.tar.bz2
Add an exception handling about getting system info
Change-Id: I355c00af16481c4dc5f96d705bf2a39373e638de Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
-rw-r--r--alarm-manager.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/alarm-manager.c b/alarm-manager.c
index b43e6c8..c5ab626 100644
--- a/alarm-manager.c
+++ b/alarm-manager.c
@@ -215,11 +215,18 @@ static profile_t _get_profile()
{
static profile_t saved = PROFILE_UNKNOWN;
char *profileName;
+ int r;
if (__builtin_expect(saved != PROFILE_UNKNOWN, 1))
return saved;
- system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+ r = system_info_get_platform_string("http://tizen.org/feature/profile",
+ &profileName);
+ if (r != SYSTEM_INFO_ERROR_NONE) {
+ ALARM_MGR_LOG_PRINT("Failed to get profile info. error(%d)", r);
+ return saved;
+ }
+
switch (*profileName) {
case 'm':
case 'M':