gpointer user_data)
{
LOGD("bus acquired(%s)", name);
-
- guint reg_id = 0;
- GError *error = NULL;
-
- reg_id = g_dbus_connection_register_object(connection,
- ALARM_MGR_DBUS_PATH,
- introspection_data->interfaces[0],
- &interface_vtable,
- NULL, NULL, &error);
- if (reg_id == 0) {
- LOGE("g_dbus_connection_register_object error(%s)", error->message);
- g_error_free(error);
- }
}
static void __on_bus_name_owner_changed(GDBusConnection *connection,
GError *error = NULL;
guint subsc_id;
guint owner_id;
+ guint reg_id;
+
LOGD("__initialize_dbus Enter");
connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
return false;
}
+ reg_id = g_dbus_connection_register_object(connection,
+ ALARM_MGR_DBUS_PATH,
+ introspection_data->interfaces[0],
+ &interface_vtable,
+ NULL, NULL, &error);
+ if (reg_id == 0) {
+ LOGE("g_dbus_connection_register_object error(%s)", error->message);
+ g_dbus_node_info_unref(introspection_data);
+ g_object_unref(connection);
+ g_error_free(error);
+ }
+
owner_id = g_bus_own_name_on_connection(connection,
ALARM_MGR_DBUS_NAME, G_BUS_NAME_OWNER_FLAGS_NONE,
__on_bus_name_acquired, NULL, NULL, NULL);
-
if (owner_id == 0) {
LOGE("Acquiring the own name is failed.");
g_dbus_node_info_unref(introspection_data);