int ret; \
ret = pthread_mutex_lock(handle); \
if (ret != 0) \
- ERR("pthread_mutex_lock: %d\n", ret); \
+ ERR("pthread_mutex_lock: %d", ret); \
} while (0)
#define CRITICAL_SECTION_END(handle) \
int ret; \
ret = pthread_mutex_unlock(handle); \
if (ret != 0) \
- ERR("pthread_mutex_unlock: %d\n", ret); \
+ ERR("pthread_mutex_unlock: %d", ret); \
} while (0)
#define CANCEL_SECTION_BEGIN() do { \
int ret; \
ret = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); \
if (ret != 0) \
- ERR("Unable to set cancelate state: %d\n", ret); \
+ ERR("Unable to set cancelate state: %d", ret); \
} while (0)
#define CANCEL_SECTION_END() do { \
int ret; \
ret = pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL); \
if (ret != 0) \
- ERR("Unable to set cancelate state: %d\n", ret); \
+ ERR("Unable to set cancelate state: %d", ret); \
} while (0)
#define CLOSE_PIPE(p) do { \
int status; \
status = close(p[PIPE_READ]); \
if (status < 0) \
- ERR("close: %d\n", errno); \
+ ERR("close: %d", errno); \
status = close(p[PIPE_WRITE]); \
if (status < 0) \
- ERR("close: %d\n", errno); \
+ ERR("close: %d", errno); \
} while (0)
#define PIPE_READ 0
const gchar *name_owner,
gpointer user_data)
{
- DBG("name appeared : %s", name);
+ DBG("name [%s]", name);
}
static void _on_name_vanished(GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
- DBG("name vanished : %s", name);
+ DBG("name [%s]", name);
monitoring_info_s *info = (monitoring_info_s *)user_data;
if (info) {
- DBG("name vanished uid : %d", info->uid);
+ DBG("vanished uid [%d]", info->uid);
g_bus_unwatch_name(info->watcher_id);
delete_monitoring_list(&_monitoring_hash, name, info->uid);
GVariant *parameters, GDBusMethodInvocation *invocation,
gpointer user_data)
{
- DBG("badge method_name: %s", method_name);
+ DBG("badge method_name [%s]", method_name);
GVariant *reply_body = NULL;
int ret = BADGE_ERROR_INVALID_PARAMETER;
ret = badge_init_display(parameters, &reply_body, uid);
if (ret == BADGE_ERROR_NONE) {
- DBG("badge service success : %d", ret);
+ DBG("Badge service success, method [%s]", method_name);
g_dbus_method_invocation_return_value(
invocation, reply_body);
} else {
- DBG("badge service fail : %d", ret);
+ ERR("Badge service fail, method_name[%s] err[%d]",
+ method_name, ret);
g_dbus_method_invocation_return_error(
invocation,
BADGE_ERROR,
int ret = BADGE_ERROR_NONE;
if (uid > NORMAL_UID_BASE && uid != *param_uid) {
- ERR("invalid sender uid : %d, param_uid : %d", uid, *param_uid);
+ ERR("Invalid sender uid[%d] param_uid[%d]", uid, *param_uid);
return BADGE_ERROR_INVALID_PARAMETER;
} else if (uid <= NORMAL_UID_BASE) {
if (*param_uid <= NORMAL_UID_BASE) {
uid_t param_uid;
g_variant_get(parameters, "(&si)", &pkgname, ¶m_uid);
- DBG("badge_get_badge_existing %s", pkgname);
ret = _validate_and_set_param_uid_with_uid(uid, ¶m_uid);
if (ret != BADGE_ERROR_NONE)
}
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get badge existing :%d\n", ret);
+ ERR("Failed to get badge existing :%d", ret);
return ret;
+ } else {
+ INFO("The badge of [%s] exists", pkgname);
}
*reply_body = g_variant_new("(i)", existing);
if (*reply_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant");
return BADGE_ERROR_OUT_OF_MEMORY;
}
- DBG("badge_get_badge_existing service done");
+
+ DBG("result [%d]", ret);
return ret;
}
ret = badge_db_get_list(&badge_list, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("badge get list fail : %d", ret);
+ ERR("Failed to get list [%d]", ret);
return ret;
}
g_variant_builder_unref(builder);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply");
return BADGE_ERROR_OUT_OF_MEMORY;
}
- DBG("badge_get_badge_list done !!");
+ DBG("Success to get badge list");
return BADGE_ERROR_NONE;
}
}
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to insert badge :%d\n", ret);
+ ERR("Failed to insert badge [%d]", ret);
return ret;
}
ret = badge_db_get_allow_to_display_by_appid(pkgname, &allow_to_display, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get allow_to_display by appid : %d\n", ret);
+ ERR("Failed to get allow_to_display by appid [%d]", ret);
return ret;
}
if (allow_to_display) {
body = g_variant_new("(si)", pkgname, param_uid);
if (body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant");
return BADGE_ERROR_OUT_OF_MEMORY;
}
g_variant_unref(body);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make reply");
return BADGE_ERROR_OUT_OF_MEMORY;
}
- INFO("badge insert : pkgname [%s], writable_pkg [%s], caller [%s]", pkgname, writable_pkg, caller);
+ INFO("Success, pkgname[%s] writable_pkg[%s] caller[%s]", pkgname, writable_pkg, caller);
return ret;
}
return BADGE_ERROR_INVALID_PARAMETER;
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to delete badge :%d\n", ret);
+ ERR("Failed to delete badge [%d]", ret);
return ret;
}
body = g_variant_new("(si)", pkgname, param_uid);
if (body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant");
return BADGE_ERROR_OUT_OF_MEMORY;
}
g_variant_unref(body);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify:%d", ret);
return ret;
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make reply");
return BADGE_ERROR_OUT_OF_MEMORY;
}
- INFO("badge delete : pkgname [%s], caller [%s]", pkgname, caller);
+ INFO("success, pkgname[%s] caller[%s]", pkgname, caller);
return ret;
}
}
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to set badge :%d\n", ret);
+ ERR("Failed to set badge [%d]", ret);
return ret;
}
ret = badge_db_get_allow_to_display_by_appid(pkgname, &allow_to_display, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get allow_to_display by appid : %d\n", ret);
+ ERR("Failed to get allow_to_display [%d]", ret);
return ret;
}
if (allow_to_display) {
body = g_variant_new("(sii)", pkgname, count, param_uid);
if (body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant");
return BADGE_ERROR_OUT_OF_MEMORY;
}
g_variant_unref(body);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
- DBG("send badge count notify done ret : %d", ret);
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make reply");
return BADGE_ERROR_OUT_OF_MEMORY;
}
- INFO("set count : pkgname [%s], caller [%s], count[%d]", pkgname, caller, count);
+ INFO("Success, pkgname[%s] caller[%s] count[%d]", pkgname, caller, count);
return ret;
}
return BADGE_ERROR_INVALID_PARAMETER;
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get badge count :%d\n", ret);
+ ERR("Failed to get badge count [%d]", ret);
return ret;
}
*reply_body = g_variant_new("(i)", count);
if (*reply_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant");
return BADGE_ERROR_OUT_OF_MEMORY;
}
- DBG("badge_get_badge_count service done");
+
+ INFO("Success, count[%d]", count);
return ret;
}
return BADGE_ERROR_INVALID_PARAMETER;
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to set display option :%d\n", ret);
+ ERR("Failed to set display option [%d]", ret);
return ret;
}
ret = badge_db_get_allow_to_display_by_appid(pkgname, &allow_to_display, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get allow_to_display by appid : %d\n", ret);
+ ERR("Failed to get allow_to_display [%d]", ret);
return ret;
}
if (allow_to_display) {
body = g_variant_new("(sii)", pkgname, is_display, param_uid);
if (body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant");
return BADGE_ERROR_OUT_OF_MEMORY;
}
g_variant_unref(body);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make reply");
return BADGE_ERROR_OUT_OF_MEMORY;
}
- INFO("set disp option : pkgname [%s], caller [%s], is_dispaly[%d]", pkgname, caller, is_display);
+ INFO("Success, pkgname[%s] caller[%s] is_dispaly[%d]",
+ pkgname, caller, is_display);
return ret;
}
if (ret != BADGE_ERROR_NONE)
return ret;
- DBG("get disp option : %s", pkgname);
-
- if (pkgname != NULL)
+ if (pkgname != NULL) {
ret = badge_db_get_display_option(pkgname, &is_display, param_uid);
- else
+ }
+ else {
+ ERR("Invalid pkgname");
return BADGE_ERROR_INVALID_PARAMETER;
+ }
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get display option :%d\n", ret);
+ ERR("Failed to get display option [%d]", ret);
return ret;
}
ret = badge_db_get_allow_to_display_by_appid(pkgname, &allow_to_display, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get allow_to_display by appid : %d\n", ret);
+ ERR("Failed to get allow_to_display [%d]", ret);
return ret;
}
*reply_body = g_variant_new("(i)", is_display);
if (*reply_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make reply");
return BADGE_ERROR_OUT_OF_MEMORY;
}
+ INFO("Success, display option[%d]", is_display);
return ret;
}
fake_body = g_variant_new("(sii)", appid, disp_option, uid);
if (fake_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant");
return BADGE_ERROR_OUT_OF_MEMORY;
}
ret = send_notify(fake_body, "set_disp_option_notify", &_monitoring_hash, PROVIDER_BADGE_INTERFACE_NAME, uid);
g_variant_unref(fake_body);
if (ret != BADGE_ERROR_NONE)
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
ret = badge_db_update_setting(pkgname, appid, allow_to_display, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("Failed badge setting update");
+ ERR("Failed to update badge setting [%d]", ret);
return ret;
}
} else {
ret = badge_db_get_display_option(appid, &disp_option, param_uid);
if (ret != BADGE_ERROR_NONE && ret != BADGE_ERROR_NOT_EXIST) {
- ERR("Failed badge_db_get_display_option");
+ ERR("Failed to get display_option [%d]", ret);
return ret;
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("Cannot make reply_body");
- ret = BADGE_ERROR_OUT_OF_MEMORY;
+ ERR("Failed to make reply_body");
+ return BADGE_ERROR_OUT_OF_MEMORY;
}
+ INFO("Success, pkgname[%s], appid[%s]", pkgname, appid);
return ret;
}
body = badge_ipc_make_gvariant_from_setting(setting);
badge_setting_free_setting(setting);
if (body == NULL) {
- ERR("fail to make gvariant from setting");
+ ERR("Failed to make gvariant from setting");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
} else {
*reply_body = g_variant_new("(v)", body);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply");
return BADGE_ERROR_OUT_OF_MEMORY;
}
+ INFO("Success, appid[%d]", appid);
return ret;
}
ret = badge_db_get_list(&badge_list, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("badge get list fail : %d", ret);
+ ERR("Failed to get list [%d]", ret);
return ret;
}
ret = badge_db_get_display_option(badge->pkg, &disp_option, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get display option");
+ ERR("Failed to get display option [%d]", ret);
continue;
}
ret = badge_db_get_allow_to_display_by_appid(badge->pkg, &allow_to_display, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get allow_to_display");
+ ERR("Failed to get allow_to_display [%d]", ret);
continue;
}
body = g_variant_new("(sii)", badge->pkg, disp_option, param_uid);
ret = send_notify(body, "set_disp_option_notify", &_monitoring_hash, PROVIDER_BADGE_INTERFACE_NAME, param_uid);
if (ret != BADGE_ERROR_NONE) {
- ERR("failed to get allow_to_display");
+ ERR("Failed to send notify");
continue;
}
g_variant_unref(body);
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
+ DBG("result [%d]", ret);
return ret;
}
_monitoring_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
result = badge_db_init();
if (result != BADGE_ERROR_NONE) {
- ERR("badge db init fail %d", result);
+ ERR("Failed to init DB [%d]", result);
return result;
}
result = badge_register_dbus_interface();
if (result != SERVICE_COMMON_ERROR_NONE) {
- ERR("badge register dbus fail %d", result);
+ ERR("Failed to register dbus interface [%d]", result);
return BADGE_ERROR_IO_ERROR;
}
snprintf(filename, namelen, "%s/%d_%s.%d", CONF_LOG_PATH, s_info.file_id, s_info.filename, getpid());
if (s_info.fp) {
if (fclose(s_info.fp) != 0)
- ERR("fclose: %d\n", errno);
+ ERR("fclose [%d]", errno);
}
if (access(filename, F_OK) == 0)
s_info.fp = fopen(filename, "w+x");
if (!s_info.fp)
- ERR("Failed to open a file: %s\n", filename);
+ ERR("Failed to open a file [%s][%d]", filename, errno);
free(filename);
}
s_info.filename = strdup(name);
if (!s_info.filename) {
- ERR("Failed to create a log file\n");
+ ERR("Failed to create a log file");
return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
}
filename = malloc(namelen);
if (!filename) {
- ERR("Failed to create a log file\n");
+ ERR("Failed to create a log file");
ret = SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
goto out;
}
s_info.fp = fopen(filename, "w+x");
if (!s_info.fp) {
- ERR("fopen: %d\n", errno);
+ ERR("fopen [%s][%d]", filename, errno);
ret = SERVICE_COMMON_ERROR_IO_ERROR;
}
if (s_info.fp) {
if (fclose(s_info.fp) != 0)
- ERR("fclose: %d\n", errno);
+ ERR("fclose [%d]", errno);
s_info.fp = NULL;
}
}
if (r != NULL)
DBG("setlocale = %s", r);
}
- DBG("setlocale = %s", r);
+ DBG("setlocale [%s]", r);
free(lang);
}
}
ret = vconf_notify_key_changed(VCONFKEY_LANGSET, lang_key_changed_cb, NULL);
if (ret < 0)
- DBG("VCONFKEY_LANGSET notify key chenaged: %d\n", ret);
+ DBG("VCONFKEY_LANGSET notify key chenaged [%d]", ret);
lang_key_changed_cb(NULL, NULL);
ret = shortcut_service_init();
if (ret < 0)
- DBG("shortcut: %d\n", ret);
+ DBG("shortcut [%d]", ret);
ret = notification_service_init();
if (ret < 0)
- DBG("noti: %d\n", ret);
+ DBG("notification [%d]", ret);
ret = badge_service_init();
if (ret < 0)
- DBG("badge: %d\n", ret);
+ DBG("badge [%d]", ret);
service_common_init();
ret = badge_service_fini();
if (ret < 0)
- DBG("badge: %d\n", ret);
+ DBG("badge [%d]", ret);
ret = notification_service_fini();
if (ret < 0)
- DBG("noti: %d\n", ret);
+ DBG("notification [%d]", ret);
ret = shortcut_service_fini();
if (ret < 0)
- DBG("shortcut: %d\n", ret);
+ DBG("shortcut [%d]", ret);
- DBG("Terminated\n");
+ DBG("Terminated");
return 0;
}
fd = ecore_main_fd_handler_fd_get(handler);
if (fd < 0) {
- ERR("Unable to get FD\n");
+ ERR("Unable to get FD");
ecore_main_fd_handler_del(handler);
return ECORE_CALLBACK_CANCEL;
}
size = read(fd, &fdsi, sizeof(fdsi));
if (size != sizeof(fdsi)) {
- ERR("read: %d\n", errno);
+ ERR("read [%d]", errno);
ecore_main_fd_handler_del(handler);
return ECORE_CALLBACK_CANCEL;
}
if (fdsi.ssi_signo == SIGTERM) {
- CRITICAL_LOG("Terminated(SIGTERM)\n");
+ CRITICAL_LOG("Terminated(SIGTERM)");
cfd = creat("/tmp/.stop.provider", 0644);
if (cfd < 0 || close(cfd) < 0)
- ERR("stop.provider: %d\n", errno);
+ ERR("stop.provider [%d]", errno);
ecore_main_loop_quit();
} else {
- CRITICAL_LOG("Unknown SIG[%d] received\n", fdsi.ssi_signo);
+ CRITICAL_LOG("Unknown SIG[%d] received", fdsi.ssi_signo);
}
return ECORE_CALLBACK_RENEW;
*/
ret = critical_log_init(util_basename(argv[0]));
if (ret < 0)
- ERR("Failed to init the critical log\n");
+ ERR("Failed to init the critical log");
sigemptyset(&mask);
ret = sigaddset(&mask, SIGTERM);
if (ret < 0)
- CRITICAL_LOG("sigaddset: %d\n", errno);
+ CRITICAL_LOG("sigaddset: %d", errno);
ret = sigprocmask(SIG_BLOCK, &mask, NULL);
if (ret < 0)
- CRITICAL_LOG("sigprocmask: %d\n", errno);
+ CRITICAL_LOG("sigprocmask: %d", errno);
ret = signalfd(-1, &mask, 0);
if (ret < 0) {
- CRITICAL_LOG("signalfd: %d\n", errno);
+ CRITICAL_LOG("signalfd: %d", errno);
} else {
signal_handler = ecore_main_fd_handler_add(
ret, ECORE_FD_READ, signal_cb,
NULL, NULL, NULL);
- CRITICAL_LOG("Signal handler initialized: %d\n", ret);
+ CRITICAL_LOG("Signal handler initialized [%d]", ret);
}
app_create();
{
monitoring_info_s *info = (monitoring_info_s *)user_data;
- DBG("name appeared name : %s, uid : %d", name, info->uid);
+ DBG("name[%s], uid[%d]", name, info->uid);
}
static void _on_name_vanished(GDBusConnection *connection,
{
monitoring_info_s *info = (monitoring_info_s *)user_data;
- DBG("name vanished : %s", name);
if (info) {
- DBG("name vanished uid : %d", info->uid);
+ DBG("name[%s], uid[%d]", name, info->uid);
notification_remove_private_sharing_target_id(name, info->uid);
g_bus_unwatch_name(info->watcher_id);
delete_monitoring_list(&_monitoring_hash, info->bus_name, info->uid);
gpointer user_data)
{
/* TODO : sender authority(privilege) check */
- DBG("notification method_name: %s, sender : %s ", method_name, sender);
+ DBG("notification method_name[%s] sender[%s]", method_name, sender);
GVariant *reply_body = NULL;
int ret = NOTIFICATION_ERROR_INVALID_OPERATION;
}
if (ret == NOTIFICATION_ERROR_NONE) {
- DBG("notification service success : %d", ret);
+ DBG("notification service success, method name[%s]", method_name);
g_dbus_method_invocation_return_value(
invocation, reply_body);
} else {
- DBG("notification service fail : %d", ret);
+ ERR("notification service fail, method_name[%s] err[%d]",
+ method_name, ret);
g_dbus_method_invocation_return_error(
invocation,
NOTIFICATION_ERROR,
print_noti(noti);
ret = notification_noti_insert(noti);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to update a notification:%d\n", ret);
+ ERR("Failed to update a notification [%d]", ret);
return ret;
}
ret = notification_get_id(noti, NULL, &priv_id);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to gets priv_id:%d\n", ret);
+ ERR("Failed to gets priv_id [%d]", ret);
return ret;
}
body = notification_ipc_make_gvariant_from_noti(noti, true);
if (body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant to noti");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
g_variant_unref(body);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
if (default_viewer != NULL) {
ret = notification_launch_default_viewer(default_viewer, priv_id);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to launch (app_control error : %d)", ret);
+ ERR("Failed to launch default viewer [%d]", ret);
return NOTIFICATION_ERROR_IO_ERROR;
}
}
*reply_body = g_variant_new("(i)", priv_id);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("_insert_noti done !!");
+ DBG("Success to add notification");
return ret;
}
ret = notification_get_uid(noti, noti_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("notification_get_uid fail ret : %d", ret);
+ ERR("Failed to get uid [%d]", ret);
return ret;
}
if (uid > NORMAL_UID_BASE && uid != *noti_uid) {
- ERR("invalid seder uid : %d, noti_uid : %d", uid, *noti_uid);
+ ERR("Invalid seder uid[%d] noti_uid[%d]", uid, *noti_uid);
return NOTIFICATION_ERROR_INVALID_PARAMETER;
} else if (uid <= NORMAL_UID_BASE) {
if (*noti_uid <= NORMAL_UID_BASE) {
*noti_uid = tzplatform_getuid(TZ_SYS_DEFAULT_USER);
ret = notification_set_uid(noti, *noti_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("notification_set_uid fail ret : %d", ret);
+ ERR("Failed to set uid [%d]", ret);
return ret;
}
- DBG("changed noti_uid %d", *noti_uid);
+ DBG("changed noti_uid[%d]", *noti_uid);
}
}
return ret;
{
int ret = NOTIFICATION_ERROR_NONE;
if (uid > NORMAL_UID_BASE && uid != *param_uid) {
- ERR("invalid seder uid : %d, param_uid : %d", uid, *param_uid);
+ ERR("invalid seder uid[%d], param_uid[%d]", uid, *param_uid);
return NOTIFICATION_ERROR_INVALID_PARAMETER;
} else if (uid <= NORMAL_UID_BASE) {
if (*param_uid <= NORMAL_UID_BASE) {
const gchar *name_owner,
gpointer user_data)
{
- DBG("sender name appeared name: %s, name_owner : %s", name, name_owner);
+ DBG("name[%s], name_owner[%s]", name, name_owner);
}
static void __sender_name_vanished_cb(GDBusConnection *connection,
info = (event_sender_info_s *)user_data;
- DBG("sender name vanished name : %s, priv_id : %d, watcher_id : %d",
+ DBG("name[%s], priv_id[%d], watcher_id[%d]",
name, info->priv_id, info->watcher_id);
delete_list = g_list_find_custom(__event_list, GINT_TO_POINTER(info->priv_id),
sender_info,
NULL);
if (!watcher_id) {
- ERR("fail to watch sender name");
+ ERR("Failed to watch sender name");
return 0;
}
- DBG("watch on %s success - watcher_id : %d", sender_info->busname, watcher_id);
+ DBG("Watch on busname[%s] watcher_id[%d]", sender_info->busname, watcher_id);
return watcher_id;
}
out:
notification_free(noti);
- DBG("notification_add_noti ret : %d", ret);
return ret;
}
ret = notification_noti_update(noti);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to update a notification:%d\n", ret);
+ ERR("Failed to update a notification [%d]", ret);
return ret;
}
ret = notification_get_id(noti, NULL, &priv_id);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to gets priv_id:%d\n", ret);
+ ERR("Failed to gets priv_id [%d]", ret);
return ret;
}
body = notification_ipc_make_gvariant_from_noti(noti, true);
if (body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant to noti");
return NOTIFICATION_ERROR_IO_ERROR;
}
g_variant_unref(body);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
if (default_viewer != NULL) {
ret = notification_launch_default_viewer(default_viewer, priv_id);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to launch (app_control error : %d)", ret);
+ ERR("Failed to launch (app_control error : %d)", ret);
return NOTIFICATION_ERROR_IO_ERROR;
}
}
*reply_body = g_variant_new("(i)", priv_id);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("_update_noti done !!");
+ DBG("Success to update noti");
return ret;
}
print_noti(noti);
*reply_body = notification_ipc_make_gvariant_from_noti(noti, true);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
} else {
if (noti)
notification_free(noti);
- DBG("_load_noti_by_tag done !!");
return ret;
}
*reply_body = notification_ipc_make_gvariant_from_noti(noti, true);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
} else {
if (noti)
notification_free(noti);
- DBG("notification_load_noti_by_priv_id done [%d]", ret);
return ret;
}
ret = _validate_and_set_param_uid_with_uid(uid, ¶m_uid);
if (ret != NOTIFICATION_ERROR_NONE)
return ret;
- DBG("load grouping list type : %d, count : %d ", type, count);
ret = notification_noti_get_grouping_list(type, count, &get_list, param_uid);
if (ret != NOTIFICATION_ERROR_NONE)
g_variant_builder_unref(builder);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("load grouping list done !!");
+ INFO("load type[%d], count[%d] ", type, count);
return ret;
}
if (ret != NOTIFICATION_ERROR_NONE)
return ret;
- DBG("get setting array : %d", count);
builder = g_variant_builder_new(G_VARIANT_TYPE("a(v)"));
if (setting_array) {
g_variant_builder_unref(builder);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
+
+ INFO("count[%d]", count);
return ret;
}
ret_pkgmgr = pkgmgrinfo_appinfo_get_appinfo(app_id, &handle);
if (ret_pkgmgr != PMINFO_R_OK) {
- ERR("failed to pkgmgrinfo_appinfo_get_appinfo [%s][%d]", app_id, ret);
+ ERR("Failed to pkgmgrinfo_appinfo_get_appinfo [%s][%d]", app_id, ret);
goto out;
}
ret_pkgmgr = pkgmgrinfo_appinfo_get_pkgname(handle, &pkgname);
if (ret_pkgmgr != PMINFO_R_OK) {
- ERR("failed to pkgmgrinfo_appinfo_get_pkgname [%s][%d]", app_id, ret);
+ ERR("Failed to pkgmgrinfo_appinfo_get_pkgname [%s][%d]", app_id, ret);
goto out;
}
ret_setting = (struct notification_setting *)malloc(sizeof(struct notification_setting));
if (ret_setting == NULL) {
- ERR("failed to alloc memory");
+ ERR("Failed to alloc memory");
goto out;
}
ret = _validate_and_set_param_uid_with_uid(uid, ¶m_uid);
if (ret != NOTIFICATION_ERROR_NONE)
return ret;
- DBG("get setting by app_id : %s uid : %d", app_id, param_uid);
ret = noti_setting_service_get_setting_by_app_id(app_id, &setting, param_uid);
if (ret == NOTIFICATION_ERROR_NOT_EXIST_ID) {
body = notification_ipc_make_gvariant_from_setting(setting);
notification_setting_free_notification(setting);
if (body == NULL) {
- ERR("fail to make gvariant");
+ ERR("Failed to make gvariant");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
*reply_body = g_variant_new("(v)", body);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
+ INFO("app_id[%s] uid[%d]", app_id, param_uid);
return ret;
}
notification_system_setting_free_system_setting(setting);
if (body == NULL) {
- ERR("fail to make gvariant");
+ ERR("Failed to make gvariant");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
} else {
*reply_body = g_variant_new("(v)", body);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("load system setting done !!");
+
return ret;
}
ret = _validate_and_set_param_uid_with_uid(uid, ¶m_uid);
if (ret != NOTIFICATION_ERROR_NONE)
return ret;
- DBG("load detail list app_id : %s, group_id : %d, priv_id : %d, count : %d ",
- app_id, group_id, priv_id, count);
ret = notification_noti_get_detail_list(app_id, group_id, priv_id,
count, &get_list, param_uid);
g_variant_builder_unref(builder);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("load detail list done !!");
+ DBG("app_id[%s], group_id[%d], priv_id[%d], count[%d]",
+ app_id, group_id, priv_id, count);
return ret;
}
ret = send_notify(parameters, "refresh_noti_notify", &_monitoring_hash, PROVIDER_NOTI_INTERFACE_NAME, param_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("_refresh_noti_service done !!");
return ret;
}
ret = send_event_notify_by_busname(body, "delete_noti", info->busname, PROVIDER_NOTI_EVENT_INTERFACE_NAME);
g_variant_unref(body);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to send event notify:%d\n", ret);
+ ERR("Failed to send event notify [%d]", ret);
return ret;
}
__event_list = g_list_remove(g_list_first(__event_list), info);
if (ret != NOTIFICATION_ERROR_NONE)
return ret;
ret = notification_noti_delete_by_priv_id_get_changes(app_id, priv_id, &num_changes, param_uid);
- DBG("priv_id: [%d] num_delete:%d\n", priv_id, num_changes);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to delete a notification:%d %d\n", ret, num_changes);
+ ERR("Failed to delete a notification, err[%d] num_changes[%d]",
+ ret, num_changes);
return ret;
}
if (num_changes > 0) {
body = g_variant_new("(iii)", 1, priv_id, param_uid);
if (body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant to noti");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
ret = send_notify(body, "delete_single_notify", &_monitoring_hash, PROVIDER_NOTI_INTERFACE_NAME, param_uid);
g_variant_unref(body);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
*reply_body = g_variant_new("(i)", priv_id);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("_del_noti_single done !!");
+
+ DBG("app_id[%s] priv_id[%d] num_changes[%d]", app_id, priv_id, num_changes);
return ret;
}
uid_t param_uid;
g_variant_get(parameters, "(&sii)", &app_id, &type, ¶m_uid);
- DBG("app_id: [%s] type: [%d]\n", app_id, type);
+ DBG("app_id [%s] type [%d]", app_id, type);
ret = _validate_and_set_param_uid_with_uid(uid, ¶m_uid);
if (ret != NOTIFICATION_ERROR_NONE)
return ret;
ret = notification_noti_delete_all(type, app_id, &num_deleted, &list_deleted, param_uid);
-
- DBG("ret: [%d] num_deleted: [%d]\n", ret, num_deleted);
-
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to delete notifications:%d\n", ret);
+ ERR("Failed to delete notifications [%d]", ret);
if (list_deleted != NULL)
free(list_deleted);
return ret;
g_variant_builder_unref(builder);
g_variant_unref(deleted_noti_list);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
*reply_body = g_variant_new("(i)", num_deleted);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("_del_noti_multiple done !!");
+ INFO("type[%d] app_id[%s] num_deleted[%d]", type, app_id, num_deleted);
return ret;
}
g_variant_get(parameters, "(i&siii)", &type, &app_id, &group_id, &priv_id, ¶m_uid);
ret = _validate_and_set_param_uid_with_uid(uid, ¶m_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("_validate_uid fail ret : %d", ret);
+ ERR("Failed to validate uid [%d]", ret);
return NOTIFICATION_ERROR_IO_ERROR;
}
ret = notification_noti_get_count(type, app_id, group_id, priv_id,
¬i_count, param_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to get count : %d\n", ret);
+ ERR("Failed to get count [%d]", ret);
return ret;
}
*reply_body = g_variant_new("(i)", noti_count);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("_get_noti_property_service done !! %d", ret);
+
+ INFO("type[%d] app_id[%s] group_id[%d] priv_id[%d] noti_count[%d]",
+ type, app_id, group_id, priv_id, noti_count);
return ret;
}
if (ret != NOTIFICATION_ERROR_NONE)
return ret;
- DBG("package_name: [%s] app_id: [%s] allow_to_notify: [%d] do_not_disturb_except: [%d] visivility_class: [%d] pop_up_notification: [%d] lock_screen_content_level: [%d]\n",
- pkgname, app_id, allow_to_notify, do_not_disturb_except, visivility_class, pop_up_notification, lock_screen_content_level);
-
ret = notification_setting_db_update(pkgname, app_id, allow_to_notify, do_not_disturb_except, visivility_class,
pop_up_notification, lock_screen_content_level, param_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to setting db update : %d\n", ret);
+ ERR("Failed to setting db update : %d", ret);
return ret;
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("_update_noti_setting_service done !! %d", ret);
+
+ INFO("package_name[%s] app_id[%s] allow_to_notify[%d] do_not_disturb_except[%d] visivility_class[%d] pop_up_notification[%d] lock_screen_content_level[%d]",
+ pkgname, app_id, allow_to_notify, do_not_disturb_except, visivility_class, pop_up_notification, lock_screen_content_level);
return ret;
}
ret = send_notify(body, "change_dnd_notify", &_monitoring_hash, PROVIDER_NOTI_INTERFACE_NAME, uid);
g_variant_unref(body);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
return ret;
}
- DBG("_dnd_schedule_alarm_cb done");
+ INFO("dnd[%d], uid[%d]", do_not_disturb, uid);
return ret;
}
time_t now;
if (date == NULL) {
- ERR("NOTIFICATION_ERROR_INVALID_PARAMETER");
+ ERR("Invalid tm data");
return NOTIFICATION_ERROR_INVALID_PARAMETER;
}
err = _get_current_time(&struct_time);
if (err != NOTIFICATION_ERROR_NONE) {
- ERR("get_current_time failed");
+ ERR("get_current_time failed [%d]", err);
goto out;
}
err = alarmmgr_set_time(alarm_info, alarm_time);
if (err != ALARMMGR_RESULT_SUCCESS) {
- ERR("alarmmgr_set_time failed (%d)", err);
+ ERR("alarmmgr_set_time failed [%d]", err);
goto out;
}
*dnd_schedule_alarm_id = alarm_id;
- DBG("alarm_id [%d]", *dnd_schedule_alarm_id);
-
out:
if (alarm_info)
alarmmgr_free_alarm(alarm_info);
+ DBG("alarm_id [%d]", *dnd_schedule_alarm_id);
return err;
}
dnd_id_data = (dnd_alarm_id_s *)malloc(sizeof(dnd_alarm_id_s));
if (dnd_id_data == NULL) {
- ERR("memory allocation fail");
+ ERR("Failed to alloc memory");
return NULL;
}
_dnd_schedule_alarm_cb,
&dnd_schedule_start_alarm_id);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("_add_alarm fail %d", ret);
+ ERR("Failed to set start alarm [%d]", ret);
return ret;
}
_dnd_schedule_alarm_cb,
&dnd_schedule_end_alarm_id);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("_add_alarm fail %d", ret);
+ ERR("Failed to set end alarm [%d]", ret);
return ret;
}
if (ret != NOTIFICATION_ERROR_NONE)
return ret;
- DBG("do_not_disturb [%d] visivility_class [%d] set_schedule [%d] lock_screen_level [%d]\n",
- do_not_disturb, visivility_class, dnd_schedule_enabled, lock_screen_level);
-
ret = noti_system_setting_get_do_not_disturb(&pre_do_not_disturb, param_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to get do not disturb");
+ ERR("Failed to get do not disturb");
return ret;
}
lock_screen_level,
param_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to setting db update system setting : %d\n", ret);
+ ERR("Failed to setting db update system setting : %d", ret);
return ret;
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
ret = _add_alarm(dnd_schedule_day, dnd_start_hour, dnd_start_min,
dnd_end_hour, dnd_end_min, param_uid);
if (ret != NOTIFICATION_ERROR_NONE)
- ERR("failed to add alarm for dnd_schedule");
+ ERR("Failed to add alarm for dnd_schedule");
} else {
_delete_alarm(param_uid);
}
- DBG("_update_noti_sys_setting_service done !! %d", ret);
-
+ INFO("do_not_disturb [%d] visivility_class [%d] set_schedule [%d] lock_screen_level [%d]",
+ do_not_disturb, visivility_class, dnd_schedule_enabled, lock_screen_level);
return ret;
}
g_variant_unref(coupled_body);
g_variant_unref(body);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to make a notification:%d\n", ret);
+ ERR("Failed to make a notification [%d]", ret);
goto out;
}
ret = notification_noti_check_count_for_template(noti, &count);
if (count >= NOTI_TEMPLATE_LIMIT) {
- ERR("Exceed limit value that is saved tamplate :%d\n", ret);
+ ERR("Exceed limit value that is saved tamplate [%d]", ret);
ret = NOTIFICATION_ERROR_MAX_EXCEEDED;
goto out;
}
ret = notification_noti_add_template(noti, template_name);
if (ret != NOTIFICATION_ERROR_NONE)
- ERR("failed to add a notification:%d\n", ret);
+ ERR("Failed to add a notification [%d]", ret);
} else {
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
if (noti)
notification_free(noti);
- DBG("notification_add_noti_template is done [%d]", ret);
return ret;
}
noti = notification_create(NOTIFICATION_TYPE_NOTI);
if (noti != NULL) {
g_variant_get(parameters, "(&s)", &template_name);
+ INFO("template name[%s]", template_name);
ret = aul_app_get_appid_bypid_for_uid(pid, app_id, sizeof(app_id), uid);
if (ret != AUL_R_OK) {
- ERR("failed to get app_id:%d", ret);
+ ERR("Failed to get app_id [%d]", ret);
ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
goto out;
}
ret = notification_noti_get_package_template(noti, app_id, template_name);
if (ret != NOTIFICATION_ERROR_NONE) {
- DBG("failed to get template:%d", ret);
+ ERR("Failed to get template [%d]", ret);
goto out;
}
*reply_body = notification_ipc_make_gvariant_from_noti(noti, false);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
} else {
if (noti)
notification_free(noti);
- DBG("notification_get_noti_template is done [%d]", ret);
return ret;
}
noti = notification_create(NOTIFICATION_TYPE_NOTI);
if (noti != NULL) {
g_variant_get(parameters, "(&s&s)", &app_id, &template_name);
-
+ INFO("app_id[%s] template name[%s]", app_id, template_name);
ret = notification_noti_get_package_template(noti, app_id, template_name);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to get template:%d", ret);
+ ERR("Failed to get template [%d]", ret);
goto out;
}
*reply_body = notification_ipc_make_gvariant_from_noti(noti, false);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
} else {
if (noti)
notification_free(noti);
- DBG("notification_get_noti_package_template is done [%d]", ret);
return ret;
}
ret = _validate_and_set_param_uid_with_uid(uid, ¶m_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("_validate_uid fail ret : %d", ret);
+ ERR("_validate_uid fail [%d]", ret);
return NOTIFICATION_ERROR_IO_ERROR;
}
}
ret = notification_get_dnd_and_allow_to_notify(app_id, &dnd, &dnd_except, &allow_to_notify, param_uid);
+ INFO("app_id[%s] dnd[%d] dnd_except[%d] allow_to_notify[%d]",
+ app_id, dnd, dnd_except, allow_to_notify);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to get_dnd_and_allow_to_notify : %d\n", ret);
+ ERR("Failed to get_dnd_and_allow_to_notify [%d]", ret);
return ret;
}
*reply_body = g_variant_new("(v)", body);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("get notification block state done");
return ret;
}
int notification_load_dnd_allow_exception(GVariant *parameters, GVariant **reply_body, uid_t uid)
ret = notification_system_setting_load_dnd_allow_exception(&dnd_allow_exception, &count, param_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to load dnd_allow_exception : %d", ret);
+ ERR("Failed to load dnd_allow_exception [%d]", ret);
return ret;
}
g_variant_builder_unref(builder);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("load dnd_allow_exception");
return ret;
}
value,
param_uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to update dnd_allow_exception : %d", ret);
+ ERR("Failed to update dnd_allow_exception [%d]", ret);
return ret;
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply_body");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("update dnd_allow_exception");
return ret;
}
g_variant_unref(body);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to make a notification from gvariant");
+ ERR("Failed to make a notification from gvariant");
goto out;
}
ret = send_event_notify_by_busname(parameters, "send_event", info->busname, PROVIDER_NOTI_EVENT_INTERFACE_NAME);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to send event");
+ ERR("Failed to send event [%d]", ret);
goto out;
}
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make reply body");
+ ERR("Failed to make reply body");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
} else {
if (noti)
notification_free(noti);
- DBG("notification_send_noti_event is done [%d]", ret);
return ret;
}
ret = notification_noti_get_by_priv_id(noti, priv_id);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to get notification by priv id [%d]", ret);
+ ERR("Failed to get notification by priv id [%d]", ret);
goto out;
}
info = __find_sender_info_by_priv_id(priv_id);
if (info == NULL || info->busname == NULL) {
ret = NOTIFICATION_ERROR_INVALID_PARAMETER;
+ ERR("No sender info by priv_id[%d]", priv_id);
goto out;
}
ret = send_event_notify_by_busname(g_variant_new("(vi)", body, event_type), "send_event", info->busname, PROVIDER_NOTI_EVENT_INTERFACE_NAME);
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make reply body");
+ ERR("Failed to make reply body");
ret = NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
} else {
if (noti)
notification_free(noti);
- DBG("notification_send_noti_event_by_priv_id done [%d]", ret);
return ret;
}
event_sender_info_s *info = NULL;
g_variant_get(parameters, "(i)", &priv_id);
- DBG("check event sender - priv_id : %d", priv_id);
+ INFO("priv_id[%d]", priv_id);
__event_list = g_list_first(__event_list);
find_list = g_list_find_custom(__event_list, GINT_TO_POINTER(priv_id),
*reply_body = g_variant_new("(i)", (int)available);
if (*reply_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant to noti");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
- DBG("notification check event receiver - available[%d]", available);
+ INFO("Receiver available[%d]", available);
return NOTIFICATION_ERROR_NONE;
}
int priv_id;
g_variant_get(parameters, "(i)", &priv_id);
- DBG("reset event sender - priv_id : %d", priv_id);
+ INFO("priv_id[%d]", priv_id);
__add_sender_info(priv_id, sender);
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("cannot make gvariant to noti");
+ ERR("Failed to make gvariant to noti");
return NOTIFICATION_ERROR_OUT_OF_MEMORY;
}
ret = notification_noti_delete_all(NOTIFICATION_TYPE_NONE, app_id, &num_deleted, &list_deleted, uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to delete notifications:%d\n", ret);
+ ERR("Failed to delete notifications [%d]", ret);
goto out;
}
g_variant_builder_unref(builder);
g_variant_unref(deleted_noti_list);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
goto out;
}
ret = noti_system_setting_load_system_setting(&setting, uid);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("noti_system_setting_load_system_setting fail %d", ret);
+ ERR("noti_system_setting_load_system_setting fail [%d]", ret);
return ret;
}
ret = notification_system_setting_dnd_schedule_get_enabled(setting,
&dnd_schedule_enabled);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("system_setting_dnd_schedule_get_enabled fail %d", ret);
+ ERR("system_setting_dnd_schedule_get_enabled fail [%d]", ret);
goto out;
}
ret = notification_system_setting_dnd_schedule_get_day(setting,
&dnd_schedule_day);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("system_setting_dnd_schedule_get_day fail %d", ret);
+ ERR("system_setting_dnd_schedule_get_day fail [%d]", ret);
goto out;
}
ret = notification_system_setting_dnd_schedule_get_start_time(setting,
&dnd_start_hour, &dnd_start_min);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("system_setting_dnd_schedule_get_start_time fail %d", ret);
+ ERR("system_setting_dnd_schedule_get_start_time fail [%d]", ret);
goto out;
}
ret = notification_system_setting_dnd_schedule_get_end_time(setting,
&dnd_end_hour, &dnd_end_min);
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("system_setting_dnd_schedule_get_end_time fail %d", ret);
+ ERR("system_setting_dnd_schedule_get_end_time fail [%d]", ret);
goto out;
}
_monitoring_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
ret = notification_db_init();
if (ret != NOTIFICATION_ERROR_NONE) {
- ERR("notification db init fail %d", ret);
+ ERR("Failed to init DB [%d]", ret);
return ret;
}
ret = notification_register_dbus_interface();
if (ret != SERVICE_COMMON_ERROR_NONE) {
- ERR("notification register dbus fail %d", ret);
+ ERR("Failed to register dbus interface [%d]", ret);
return NOTIFICATION_ERROR_IO_ERROR;
}
if (uids)
free(uids);
- DBG("Successfully initialized\n");
+ DBG("Successfully initialized");
return NOTIFICATION_ERROR_NONE;
}
HAPI int notification_service_fini(void)
{
pkgmgr_fini();
- DBG("Successfully Finalized\n");
+ DBG("Successfully Finalized");
return NOTIFICATION_ERROR_NONE;
}
invoke_app_disable_event_handler(uid, pkgname, item->status, value);
break;
default:
- ERR("Unknown type: %d\n", item->type);
+ ERR("Unknown type: %d", item->type);
break;
}
}
struct item *item;
if (!pkgname) {
- ERR("Package name is not valid\n");
+ ERR("Invalid pkgname");
return NULL;
}
return item;
}
- DBG("Package %s is not found\n", pkgname);
+ DBG("Package [%s] is not found", pkgname);
return NULL;
}
{
struct item *item;
- DBG("[%s] %s\n", pkgname, val);
+ INFO("pkgname[%s] val[%s]", pkgname, val);
item = calloc(1, sizeof(*item));
if (!item) {
- ERR("calloc: %d\n", errno);
+ ERR("calloc [%d]", errno);
return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
}
item->pkgname = strdup(pkgname);
if (!item->pkgname) {
- ERR("strdup: %d\n", errno);
+ ERR("strdup [%d]", errno);
free(item);
return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
}
} else {
free(item->pkgname);
free(item);
- ERR("Invalid val: %s\n", val);
+ ERR("Invalid val [%s]", val);
return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
}
s_info.item_list = eina_list_append(s_info.item_list, item);
{
struct item *item;
- DBG("[%s] %s\n", pkgname, val);
+ DBG("pkgname[%s] val[%s]", pkgname, val);
item = find_item(pkgname, uid);
if (!item)
item->icon = strdup(val);
if (!item->icon) {
- ERR("strdup: %d\n", errno);
+ ERR("strdup [%d]", errno);
return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
}
{
struct item *item;
- DBG("[%s] %s\n", pkgname, val);
+ DBG("pkgname[%s] val[%s]", pkgname, val);
item = find_item(pkgname, uid);
if (!item)
return SERVICE_COMMON_ERROR_NOT_EXIST;
if (!is_valid_status(item, val)) {
- DBG("Invalid status: %d, %s\n", item->type, val);
+ DBG("Invalid status[%d] val[%s]", item->type, val);
return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
}
/* val = error */
struct item *item;
- DBG("[%s] %s\n", pkgname, val);
+ INFO("pkgname[%s] val[%s]", pkgname, val);
item = find_item(pkgname, uid);
if (!item)
struct item *item;
char *new_pkgname;
- DBG("[%s] %s\n", pkgname, val);
+ INFO("pkgname[%s] val[%s]", pkgname, val);
item = find_item(pkgname, uid);
if (!item)
new_pkgname = strdup(val);
if (!new_pkgname) {
- ERR("strdup: %d\n", errno);
+ ERR("strdup: %d", errno);
return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
}
struct item *item;
double value;
- DBG("[%s] %s\n", pkgname, val);
+ INFO("pkgname[%s] val[%s]", pkgname, val);
item = find_item(pkgname, uid);
if (!item) {
- DBG("ITEM is not started from the start_cb\n");
+ DBG("ITEM is not started from the start_cb");
return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
}
if (item->type != PKGMGR_EVENT_DOWNLOAD) {
- DBG("TYPE is not \"download\" : %d\n", item->type);
+ DBG("TYPE is not \"download\" [%d]", item->type);
item->type = PKGMGR_EVENT_DOWNLOAD;
}
case PKGMGR_STATUS_PROCESSING:
break;
default:
- ERR("Invalid state [%s, %s]\n", pkgname, val);
+ ERR("Invalid status, pkgname[%s] val[%s]", pkgname, val);
return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
}
struct item *item;
double value;
- DBG("[%s] %s\n", pkgname, val);
-
item = find_item(pkgname, uid);
if (!item) {
- ERR("ITEM is not started from the start_cb\n");
+ ERR("ITEM is not started from the start_cb");
return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
}
case PKGMGR_STATUS_PROCESSING:
break;
default:
- ERR("Invalid state [%s, %s]\n", pkgname, val);
+ ERR("Invalid status, pkgname[%s] val[%s]", pkgname, val);
return SERVICE_COMMON_ERROR_INVALID_PARAMETER;
}
{
struct item *item;
- DBG("[%s] %s\n", pkgname, val);
+ DBG("[%s] %s", pkgname, val);
item = find_item(pkgname, uid);
if (!item)
ret = handler[i].func(target_uid, pkgname, val, data);
if (ret < 0) {
- DBG("REQ[%d], UID[%d], pkgname[%s], type[%s], key[%s], val[%s], ret = %d\n",
+ DBG("REQ[%d] UID[%d] pkgname[%s] type[%s] key[%s] val[%s] ret[%d]",
req_id, target_uid, pkgname, type, key, val, ret);
}
}
ret = handler[i].func(target_uid, appid, val, data);
if (ret < 0) {
- DBG("REQ[%d], UID[%d], appid[%s], type[%s], key[%s], val[%s], ret = %d\n",
+ DBG("REQ[%d] UID[%d] appid[%s] type[%s] key[%s] val[%s] ret[%d]",
req_id, target_uid, appid, pkg_type, key, val, ret);
}
}
item = calloc(1, sizeof(*item));
if (!item) {
- ERR("calloc: %d\n", errno);
+ ERR("calloc [%d]", errno);
return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
}
}
break;
default:
- ERR("Invalid type\n");
+ ERR("Invalid type");
break;
}
char *text = NULL;
char *content = NULL;
const char *tag = NULL;
- const char *vibration_path = NULL;
- notification_vibration_type_e type;
notification_get_pkgname(noti, &pkgname);
notification_get_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, &text);
notification_get_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT, &content);
notification_get_tag(noti, &tag);
- notification_get_vibration(noti, &type, &vibration_path);
- DBG("provider print_noti pkgname = %s", pkgname);
- DBG("provider print_noti title = %s", text);
- DBG("provider print_noti content = %s", content);
- DBG("provider print_noti tag = %s", tag);
- DBG("provider print_noti vibration_path = %s %d", vibration_path, type);
+ DBG("Noti-info : pkgname[%s] title[%s] content[%s] tag[%s]",
+ pkgname, text, content, tag);
}
uid_t get_sender_uid(const char *sender_name)
msg = g_dbus_message_new_method_call(DBUS_NAME, DBUS_OBJECT_PATH,
DBUS_INTERFACE_NAME, "GetConnectionUnixUser");
if (!msg) {
- LOGE("Can't allocate new method call");
+ LOGE("Failed to alloc new method call");
goto out;
}
msg = g_dbus_message_new_method_call(DBUS_NAME, DBUS_OBJECT_PATH,
DBUS_INTERFACE_NAME, "GetConnectionUnixProcessID");
if (!msg) {
- LOGE("Can't allocate new method call");
+ LOGE("Failed to alloc new method call");
goto out;
}
msg = g_dbus_message_new_method_call(DBUS_NAME, DBUS_OBJECT_PATH,
DBUS_INTERFACE_NAME, "NameHasOwner");
if (!msg) {
- LOGE("Can't allocate new method call");
+ LOGE("Failed to alloc new method call");
goto out;
}
int monitoring_count = 0;
bool is_existed = false;
- DBG("send_notify uid : %d", uid);
-
monitoring_list = (GList *)g_hash_table_lookup(*monitoring_hash, GUINT_TO_POINTER(uid));
target_list = g_list_first(monitoring_list);
for (; target_list != NULL; ) {
if (g_variant_is_floating(body))
g_variant_ref(body);
- DBG("emit signal to : %s", target_bus_name);
if (g_dbus_connection_emit_signal(_gdbus_conn,
target_bus_name,
PROVIDER_OBJECT_PATH,
cmd,
body,
&err) == FALSE) {
-
- ERR("g_dbus_connection_emit_signal() is failed");
if (err != NULL) {
- ERR("g_dbus_connection_emit_signal() err : %s",
- err->message);
+ ERR("Emit signal err [%s]", err->message);
g_error_free(err);
}
is_existed = is_existed_busname(target_bus_name);
if (is_existed == false)
delete_monitoring_list(monitoring_hash, target_bus_name, uid);
- ERR("failed to emit signal: %s", target_bus_name);
+ ERR("Fail, emit signal to [%s]", target_bus_name);
}
monitoring_count++;
- DBG("signal send done: %s", target_bus_name);
+ DBG("Success, emit signal to [%s]", target_bus_name);
}
- DBG("provider _send_notify cmd : [%s], monitoring count : [%d] done", cmd, monitoring_count);
+ DBG("Success, cmd[%s] monitoring count[%d]", cmd, monitoring_count);
return SERVICE_COMMON_ERROR_NONE;
}
if (g_variant_is_floating(body))
g_variant_ref(body);
- DBG("emit signal to : %s", busname);
if (g_dbus_connection_emit_signal(_gdbus_conn,
busname,
PROVIDER_OBJECT_PATH,
cmd,
body,
&err) == FALSE) {
- ERR("g_dbus_connection_emit_signal() is failed");
if (err != NULL) {
- ERR("g_dbus_connection_emit_signal() err : %s",
+ ERR("Emit signal err [%s]",
err->message);
g_error_free(err);
}
+ ERR("Failed to emit signal to [%s]", busname);
return SERVICE_COMMON_ERROR_IO_ERROR;
}
- DBG("provider signal send event notify done : busname[%s] cmd[%s]", busname, cmd);
+ DBG("Success, Emit signal to [%s] cmd[%s]", busname, cmd);
return SERVICE_COMMON_ERROR_NONE;
}
DBG("add new sender to list");
m_info = (monitoring_info_s *)calloc(1, sizeof(monitoring_info_s));
if (m_info == NULL) {
- ERR("Can not alloc monitoring_info_s");
+ ERR("Failed to alloc memory");
return SERVICE_COMMON_ERROR_IO_ERROR;
}
m_info,
NULL);
if (m_info->watcher_id == 0) {
- ERR("fail to watch name");
+ ERR("Fail to watch name [%d]", bus_name);
free(m_info->bus_name);
free(m_info);
return SERVICE_COMMON_ERROR_IO_ERROR;
} else {
- DBG("watch on %s success", bus_name);
+ DBG("Watch on [%s] success", bus_name);
}
monitoring_list = g_list_append(monitoring_list, strdup(bus_name));
- DBG("service_register : register success sender is %s , length : %d",
+ DBG("Success, sender[%s] length[%d]",
sender, g_list_length(monitoring_list));
if (g_hash_table_lookup(*monitoring_hash, GUINT_TO_POINTER(request_uid)) == NULL)
g_hash_table_insert(*monitoring_hash, GUINT_TO_POINTER(request_uid), monitoring_list);
} else {
- ERR("service_register : register sender %s already exist", sender);
+ ERR("Sender [%s] already exist", sender);
}
*reply_body = g_variant_new("()");
free(m_info);
}
monitoring_list = g_list_remove(monitoring_list, bus_name);
- ERR("cannot make reply_body");
+ ERR("Failed to make reply");
return SERVICE_COMMON_ERROR_OUT_OF_MEMORY;
}
return SERVICE_COMMON_ERROR_NONE;
monitoring_list = (GList *)g_hash_table_lookup(*monitoring_hash, GUINT_TO_POINTER(uid));
if (monitoring_list == NULL) {
- ERR("Failed g_hash_table_lookup uid : %d", uid);
+ ERR("No uid[%d] in monitoring hash", uid);
return SERVICE_COMMON_ERROR_IO_ERROR;
}
(GCompareFunc)_monitoring_app_list_compare_cb);
if (del_list) {
- DBG("Find delete list - uid : %d , sender : %s", uid, sender);
+ DBG("Find delete list - uid[%d] sender[%s]", uid, sender);
bus_name = g_list_nth_data(del_list, 0);
if (bus_name)
free(bus_name);
result = _dbus_init();
if (result != SERVICE_COMMON_ERROR_NONE) {
- ERR("Can't init dbus %d", result);
+ ERR("Can't init dbus [%d]", result);
result = SERVICE_COMMON_ERROR_IO_ERROR;
goto out;
}
NULL,
NULL, NULL);
if (!owner_id) {
- ERR("g_bus_own_name error");
+ ERR("Failed to own name");
result = SERVICE_COMMON_ERROR_IO_ERROR;
goto out;
}
- DBG("Acquiring the own name : %d", owner_id);
+ DBG("Acquiring the own name [%d]", owner_id);
introspection_data = g_dbus_node_info_new_for_xml(introspection_xml, &error);
if (!introspection_data) {
- ERR("g_dbus_node_info_new_for_xml() is failed.");
+ ERR("g_dbus_node_info_new_for_xml is failed.");
result = SERVICE_COMMON_ERROR_IO_ERROR;
if (error != NULL) {
- ERR("g_dbus_node_info_new_for_xml error [%s]", error->message);
+ ERR("g_dbus_node_info_new_for_xml err [%s]", error->message);
g_error_free(error);
}
goto out;
PROVIDER_OBJECT_PATH, introspection_data->interfaces[0],
&interface_vtable, NULL, NULL, NULL);
- DBG("noti_registration_id %d", noti_registration_id);
+ DBG("registration id[%d]", noti_registration_id);
if (noti_registration_id == 0) {
ERR("Failed to g_dbus_connection_register_object");
result = SERVICE_COMMON_ERROR_IO_ERROR;
const gchar *name_owner,
gpointer user_data)
{
- DBG("name appeared : %s", name);
+ DBG("name [%s]", name);
}
static void _on_name_vanished(GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
- DBG("name vanished : %s", name);
+ DBG("name [%s]", name);
monitoring_info_s *info = (monitoring_info_s *)user_data;
if (info) {
- DBG("name vanished uid : %d", info->uid);
+ DBG("vanished uid [%d]", info->uid);
g_bus_unwatch_name(info->watcher_id);
delete_monitoring_list(&_monitoring_hash, name, info->uid);
gpointer user_data)
{
/* TODO : sender authority(privilege) check */
- DBG("shortcut method_name: %s", method_name);
+ DBG("shortcut method_name [%s]", method_name);
GVariant *reply_body = NULL;
int ret = SHORTCUT_ERROR_NOT_SUPPORTED;
uid_t uid = get_sender_uid(sender);
}
if (ret == SERVICE_COMMON_ERROR_NONE) {
- DBG("shortcut service success : %d", ret);
+ DBG("shortcut service success, method[%s]", method_name);
g_dbus_method_invocation_return_value(
invocation, reply_body);
} else {
- DBG("shortcut service fail : %d", ret);
+ DBG("shortcut service fail, method_name[%s] err[%d]",
+ method_name, ret);
g_dbus_method_invocation_return_error(
invocation,
SHORTCUT_ERROR,
g_variant_dict_end(&dict);
count = shortcut_db_get_list(package_name, &shortcut_list);
- DBG("shortcut count : %d", count);
builder = g_variant_builder_new(G_VARIANT_TYPE("a(v)"));
if (count > 0) {
iter_list = g_list_first(shortcut_list);
g_variant_builder_unref(builder);
if (*reply_body == NULL) {
- ERR("cannot make reply_body");
+ ERR("Failed to make reply");
return SHORTCUT_ERROR_OUT_OF_MEMORY;
}
- DBG("shortcut_get_shortcut_service_list done !!");
+ INFO("count[%d]", count);
return SERVICE_COMMON_ERROR_NONE;
}
g_hash_table_insert(_invocation_hash, strdup(request_id), invocation);
- DBG("add invocation is done, key [%s]", request_id);
+ DBG("Invocation key [%s]", request_id);
}
static void _remove_invocation(char *request_id)
g_hash_table_remove(_invocation_hash, request_id);
- DBG("remove invocation is done, key [%s]", request_id);
+ DBG("Invocation key [%s]", request_id);
}
/* add_shortcut */
ret = send_notify(parameters, "add_shortcut_notify", &_monitoring_hash, PROVIDER_SHORTCUT_INTERFACE_NAME, uid);
if (ret != SERVICE_COMMON_ERROR_NONE)
- ERR("failed to send notify:%d\n", ret);
+ ERR("Failed to send notify [%d]", ret);
+ else
+ DBG("Success to send notify");
- DBG("shortcut_add is done");
}
/* add_shortcut_widget */
ret = send_notify(parameters, "add_shortcut_widget_notify", &_monitoring_hash, PROVIDER_SHORTCUT_INTERFACE_NAME, uid);
if (ret != SERVICE_COMMON_ERROR_NONE)
- ERR("failed to send notify:%d\n", ret);
-
- DBG("shortcut_add_widget is done");
+ ERR("Failed to send notify [%d]", ret);
+ else
+ DBG("Success to send notify");
}
/* remove_shortcut */
ret = send_notify(parameters, "remove_shortcut_notify", &_monitoring_hash, PROVIDER_SHORTCUT_INTERFACE_NAME, uid);
if (ret != SERVICE_COMMON_ERROR_NONE)
- ERR("failed to send notify:%d\n", ret);
-
- DBG("shortcut_remove is done");
+ ERR("Failed to send notify [%d]", ret);
+ else
+ DBG("Success to send notify");
}
/* check shortcut privilege */
*reply_body = g_variant_new("()");
if (*reply_body == NULL) {
- ERR("Cannot make reply body");
+ ERR("Failed to make reply");
return SHORTCUT_ERROR_OUT_OF_MEMORY;
}
- DBG("shortcut_send_return_value success");
+ DBG("Success to send return value");
return SHORTCUT_ERROR_NONE;
}
result = shortcut_register_dbus_interface();
if (result != SERVICE_COMMON_ERROR_NONE) {
- ERR("shortcut register dbus fail %d", result);
+ ERR("Failed to register dbus interface [%d]", result);
return result;
}
- DBG("Successfully initialized\n");
+ DBG("Initialization success");
return result;
}
{
g_hash_table_destroy(_invocation_hash);
- DBG("Successfully Finalized\n");
+ DBG("Finalization success");
return SERVICE_COMMON_ERROR_NONE;
}
struct timeval tv;
if (gettimeofday(&tv, NULL) < 0) {
static unsigned long internal_count = 0;
- ERR("gettimeofday: %d\n", errno);
+ ERR("gettimeofday [%d]", errno);
tv.tv_sec = internal_count++;
tv.tv_usec = 0;
}
HAPI void util_setup_log_disk(void)
{
if (access(CONF_LOG_PATH, R_OK | W_OK | X_OK) == 0) {
- DBG("[%s] is already accessible\n", CONF_LOG_PATH);
+ DBG("[%s] is already accessible", CONF_LOG_PATH);
return;
}
- DBG("Initiate the critical log folder [%s]\n", CONF_LOG_PATH);
+ DBG("Initiate the critical log folder [%s]", CONF_LOG_PATH);
if (mkdir(CONF_LOG_PATH, 0755) < 0)
- ERR("mkdir: %d\n", errno);
+ ERR("mkdir: %d", errno);
}
HAPI const char *util_basename(const char *name)