if (changed_cb == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- if (notification_ipc_monitor_init(uid) != NOTIFICATION_ERROR_NONE)
- return NOTIFICATION_ERROR_IO_ERROR;
-
if (_noti_cb_hash == NULL)
_noti_cb_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
noti_cb_list = g_list_append(noti_cb_list, noti_cb_info_new);
}
+ if (notification_ipc_monitor_init(uid) != NOTIFICATION_ERROR_NONE) {
+ notification_unresister_changed_cb_for_uid(changed_cb, uid);
+ return NOTIFICATION_ERROR_IO_ERROR;
+ }
+
return NOTIFICATION_ERROR_NONE;
}
if (detailed_changed_cb == NULL)
return NOTIFICATION_ERROR_INVALID_PARAMETER;
- if (notification_ipc_monitor_init(uid) != NOTIFICATION_ERROR_NONE)
- return NOTIFICATION_ERROR_IO_ERROR;
-
if (_noti_cb_hash == NULL)
_noti_cb_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
noti_cb_list = g_list_append(noti_cb_list, noti_cb_info_new);
}
+ if (notification_ipc_monitor_init(uid) != NOTIFICATION_ERROR_NONE) {
+ notification_unregister_detailed_changed_cb_for_uid(detailed_changed_cb, user_data, uid);
+ return NOTIFICATION_ERROR_IO_ERROR;
+ }
+
return NOTIFICATION_ERROR_NONE;
}
return result;
}
+ is_master_started = 1;
+
noti_op = _ipc_create_op(NOTIFICATION_OP_SERVICE_READY, 1, NULL, 1, NULL);
if (noti_op != NULL) {
notification_call_changed_cb_for_uid(noti_op, 1, uid);
int uid = GPOINTER_TO_INT(user_data);
DBG("uid[%d] name[%s]", uid, name);
- is_master_started = 1;
- _ipc_monitor_register(uid);
+
+ if (is_master_started == 0)
+ _ipc_monitor_register(uid);
/* TODO: dbus activation isn't enough ? */
_do_deffered_task();
}
if (provider_monitor_id == 0) {
-
provider_monitor_id = g_bus_watch_name_on_connection(
_gdbus_conn,
PROVIDER_BUS_NAME,