Add logs to check errors 30/302530/6
authorSukhyungKang <shine.kang@samsung.com>
Fri, 8 Dec 2023 05:31:01 +0000 (14:31 +0900)
committerSukhyungKang <shine.kang@samsung.com>
Fri, 8 Dec 2023 06:50:25 +0000 (15:50 +0900)
Change-Id: I2572df97ad2528ac0a1465cfa8ab200fe7940395
Signed-off-by: SukhyungKang <shine.kang@samsung.com>
Signed-off-by: jusung son <jusung07.son@samsung.com>
notification/src/notification_internal.c
notification/src/notification_ipc.c

index 3a7fff9..207294b 100644 (file)
@@ -138,6 +138,7 @@ static gint __priv_id_compare(gconstpointer a, gconstpointer b)
                return -1;
 
        info = (notification_event_cb_info_s *)a;
+       WARN("src id [%d] dst id [%d]", GPOINTER_TO_INT(b), info->priv_id);
 
        if (info->priv_id == GPOINTER_TO_INT(b))
                return 0;
@@ -152,6 +153,8 @@ void notification_call_event_handler_cb(notification_h noti, int event_type)
        GList *find_list;
        notification_event_cb_info_s *info;
 
+       WARN("call noti id [%d] event[%d]", info->priv_id, event_type);
+
        if (__noti_event_cb_list == NULL)
                return;
 
@@ -167,6 +170,7 @@ void notification_call_event_handler_cb(notification_h noti, int event_type)
 
        info = g_list_nth_data(find_list, 0);
        info->cb(noti, event_type, info->userdata);
+       WARN("done");
 }
 /* LCOV_EXCL_STOP */
 
@@ -176,6 +180,8 @@ void notification_delete_event_handler_cb(int priv_id)
        GList *delete_list;
        notification_event_cb_info_s *info;
 
+       WARN("delete noti id [%d]", priv_id);
+
        if (__noti_event_cb_list == NULL)
                return;
 
@@ -194,6 +200,7 @@ void notification_delete_event_handler_cb(int priv_id)
 
        if (__noti_event_cb_list == NULL)
                notification_ipc_event_monitor_fini();
+       WARN("done");
 }
 /* LCOV_EXCL_STOP */
 
@@ -1448,6 +1455,7 @@ EXPORT_API int notification_update_for_uid(notification_h noti, uid_t uid)
        noti->uid = uid;
        /* Update insert time ? */
        noti->insert_time = time(NULL);
+       WARN("updated notification id[%d]", noti->priv_id);
 
        return notification_ipc_request_update(noti);
 }
@@ -1700,6 +1708,8 @@ EXPORT_API int notification_post_with_event_cb_for_uid(notification_h noti, even
 
        noti->priv_id = priv_id;
 
+       WARN("Posted notification id[%d]", priv_id);
+
        __noti_event_cb_list = g_list_first(__noti_event_cb_list);
        find_list = g_list_find_custom(__noti_event_cb_list, GINT_TO_POINTER(priv_id),
                                       (GCompareFunc)__priv_id_compare);
@@ -1708,6 +1718,7 @@ EXPORT_API int notification_post_with_event_cb_for_uid(notification_h noti, even
                info = g_list_nth_data(find_list, 0);
                info->cb = cb;
                info->userdata = userdata;
+               WARN("event cb is existed id[%d]", priv_id);
        } else {
                info = (notification_event_cb_info_s *)malloc(sizeof(notification_event_cb_info_s));
                if (info == NULL) {
@@ -1718,6 +1729,7 @@ EXPORT_API int notification_post_with_event_cb_for_uid(notification_h noti, even
                info->cb = cb;
                info->userdata = userdata;
                __noti_event_cb_list = g_list_append(__noti_event_cb_list, info);
+               WARN("new event cb appended id[%d]", priv_id);
        }
 
        return ret;
index 07f215f..aa39bda 100644 (file)
@@ -644,7 +644,7 @@ static void _handle_noti_event_handler_notify(GDBusConnection *connection,
                GVariant        *parameters,
                gpointer         user_data)
 {
-       DBG("own_name : %s signal_name: %s",
+       WARN("own_name : %s signal_name: %s",
                         g_dbus_connection_get_unique_name(connection), signal_name);
 
        if (g_strcmp0(signal_name, "send_event") == 0)
@@ -2632,7 +2632,7 @@ static void _on_name_appeared(GDBusConnection *connection,
 {
        int uid = GPOINTER_TO_INT(user_data);
 
-       DBG("uid[%d] name[%s]", uid, name);
+       WARN("uid[%d] name[%s]", uid, name);
 
        if (is_master_started == 0)
                _ipc_monitor_register(uid);