*
* Connection Manager
*
- * Copyright (C) 2007 Intel Corporation. All rights reserved.
+ * Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
ifname = libhal_device_get_property_string(ctx, udi,
"net.interface", NULL);
if (ifname != NULL && ifname_filter != NULL &&
- *ifname_filter != '\0' &&
g_str_equal(ifname, ifname_filter) == FALSE) {
device_free(iface);
return -1;
conn = libhal_ctx_get_dbus_connection(ctx);
- g_dbus_register_object(conn, iface->path, iface, device_free);
-
interfaces = g_slist_append(interfaces, iface);
if (iface->flags & CONNMAN_IFACE_FLAG_IPV4) {
g_dbus_register_interface(conn, iface->path,
CONNMAN_IFACE_INTERFACE,
- iface_methods, iface_signals, NULL);
+ iface_methods, iface_signals, NULL,
+ iface, device_free);
DBG("iface %p identifier %s", iface, iface->identifier);
interfaces = g_slist_remove(interfaces, iface);
g_dbus_unregister_interface(conn, iface->path,
CONNMAN_IFACE_INTERFACE);
- g_dbus_unregister_object_hierarchy(conn, iface->path);
break;
}
}
g_dbus_unregister_interface(conn, iface->path,
CONNMAN_IFACE_INTERFACE);
-
- g_dbus_unregister_object_hierarchy(conn, iface->path);
}
g_slist_free(interfaces);
hal_init(connection);
- hal_watch = g_dbus_add_watch(connection, "org.freedesktop.Hal",
+ hal_watch = g_dbus_add_service_watch(connection, "org.freedesktop.Hal",
hal_init, hal_cleanup, connection, NULL);
return 0;