summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSukhyungKang <shine.kang@samsung.com>2023-12-08 14:31:01 +0900
committerSukhyungKang <shine.kang@samsung.com>2023-12-08 15:50:25 +0900
commit0d51bbcd77a83411d22427518106def6ae25414d (patch)
tree345e2b417f89adf2cdbcb30316ef6fdc7c718d17
parent318e53e41801bf19413a9a69b33536a7a1837d0a (diff)
downloadnotification-0d51bbcd77a83411d22427518106def6ae25414d.tar.gz
notification-0d51bbcd77a83411d22427518106def6ae25414d.tar.bz2
notification-0d51bbcd77a83411d22427518106def6ae25414d.zip
Add logs to check errors
Change-Id: I2572df97ad2528ac0a1465cfa8ab200fe7940395 Signed-off-by: SukhyungKang <shine.kang@samsung.com> Signed-off-by: jusung son <jusung07.son@samsung.com>
-rw-r--r--notification/src/notification_internal.c12
-rw-r--r--notification/src/notification_ipc.c4
2 files changed, 14 insertions, 2 deletions
diff --git a/notification/src/notification_internal.c b/notification/src/notification_internal.c
index 3a7fff9..207294b 100644
--- a/notification/src/notification_internal.c
+++ b/notification/src/notification_internal.c
@@ -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;
diff --git a/notification/src/notification_ipc.c b/notification/src/notification_ipc.c
index 07f215f..aa39bda 100644
--- a/notification/src/notification_ipc.c
+++ b/notification/src/notification_ipc.c
@@ -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);