Add an exception handling about getting system info 03/199203/2
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 7 Feb 2019 06:52:55 +0000 (15:52 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 7 Feb 2019 07:00:52 +0000 (16:00 +0900)
Change-Id: I355c00af16481c4dc5f96d705bf2a39373e638de
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
alarm-manager.c

index b43e6c8..c5ab626 100644 (file)
@@ -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':