Add error handling condition 34/166834/1
authorSeungha Son <seungha.son@samsung.com>
Fri, 12 Jan 2018 05:18:38 +0000 (14:18 +0900)
committerSeungha Son <seungha.son@samsung.com>
Fri, 12 Jan 2018 05:19:02 +0000 (14:19 +0900)
Signed-off-by: Seungha Son <seungha.son@samsung.com>
Change-Id: Iaa3b56a934c5acab10d11d457e42a15784798bcb

src/notification_ipc.c

index fe0ce76606427d65456cce5e24b7cc17e1f1eef7..1f8737e791f5043fa202326386deb4fd5558e1c8 100755 (executable)
@@ -2487,14 +2487,17 @@ int notification_ipc_make_dnd_allow_exception_from_gvariant(struct notification_
 
 static int _send_service_register(uid_t uid)
 {
-       GDBusMessage *reply = NULL;
        int result;
        notification_op *noti_op = NULL;
+       GDBusMessage *reply = NULL;
 
        result = _send_sync_noti(g_variant_new("(i)", uid), &reply, "noti_service_register");
-
        if (reply)
                g_object_unref(reply);
+       if (result != NOTIFICATION_ERROR_NONE) {
+               ERR("send sync noti [%d]", result);
+               return result;
+       }
 
        noti_op = _ipc_create_op(NOTIFICATION_OP_SERVICE_READY, 1, NULL, 1, NULL);
        if (noti_op != NULL) {