add error handling when it occured msg-server is not ready 45/67545/2
authorKyeonghun Lee <kh9090.lee@samsung.com>
Wed, 27 Apr 2016 07:55:30 +0000 (16:55 +0900)
committerKyeonghun Lee <kh9090.lee@samsung.com>
Wed, 27 Apr 2016 07:56:45 +0000 (16:56 +0900)
Change-Id: Idb49eddfc37781a70c40eac84b256a860b7d8c00
Signed-off-by: Kyeonghun Lee <kh9090.lee@samsung.com>
manager/src/msg-manager.cpp

index a8c1af3..588d7f6 100644 (file)
@@ -97,7 +97,7 @@ bool service_app_create(void *data)
                if (msg_server_ready == 1) {
                        int msg_err = msg_open_msg_handle(&msg_handle);
                        if (msg_err != MSG_SUCCESS)
-                               MSG_MGR_DEBUG("msg_open_msg_handle() failed [%d]", msg_err);
+                               MSG_MGR_ERR("msg_open_msg_handle() failed [%d]", msg_err);
                        else
                                MSG_MGR_DEBUG("msg_open_msg_handle() success");
 
@@ -108,6 +108,9 @@ bool service_app_create(void *data)
                }
        }
 
+       if (msg_handle == NULL)
+               return false;
+
        MsgMgrInitNoti();
        initMsgMgrSoundPlayer();
        cm_init(&cm_handle);