projects
/
connman
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add definitions for IPv4 methods
[connman]
/
src
/
iface.c
diff --git
a/src/iface.c
b/src/iface.c
index
6be7b87
..
e5b88fa
100644
(file)
--- a/
src/iface.c
+++ b/
src/iface.c
@@
-2,7
+2,7
@@
*
* Connection Manager
*
*
* 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
*
* 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
@@
-1268,7
+1268,6
@@
static int probe_device(LibHalContext *ctx,
ifname = libhal_device_get_property_string(ctx, udi,
"net.interface", NULL);
if (ifname != NULL && ifname_filter != NULL &&
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;
g_str_equal(ifname, ifname_filter) == FALSE) {
device_free(iface);
return -1;
@@
-1302,8
+1301,6
@@
static int probe_device(LibHalContext *ctx,
conn = libhal_ctx_get_dbus_connection(ctx);
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) {
interfaces = g_slist_append(interfaces, iface);
if (iface->flags & CONNMAN_IFACE_FLAG_IPV4) {
@@
-1314,7
+1311,8
@@
static int probe_device(LibHalContext *ctx,
g_dbus_register_interface(conn, iface->path,
CONNMAN_IFACE_INTERFACE,
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);
DBG("iface %p identifier %s", iface, iface->identifier);
@@
-1374,7
+1372,6
@@
static void device_removed(LibHalContext *ctx, const char *udi)
interfaces = g_slist_remove(interfaces, iface);
g_dbus_unregister_interface(conn, iface->path,
CONNMAN_IFACE_INTERFACE);
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;
}
}
break;
}
}
@@
-1477,8
+1474,6
@@
static void hal_cleanup(void *data)
g_dbus_unregister_interface(conn, iface->path,
CONNMAN_IFACE_INTERFACE);
g_dbus_unregister_interface(conn, iface->path,
CONNMAN_IFACE_INTERFACE);
-
- g_dbus_unregister_object_hierarchy(conn, iface->path);
}
g_slist_free(interfaces);
}
g_slist_free(interfaces);
@@
-1507,7
+1502,7
@@
int __connman_iface_init(DBusConnection *conn, const char *interface)
hal_init(connection);
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;
hal_init, hal_cleanup, connection, NULL);
return 0;