Remove DBusConnection reference from device/network interfaces
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 5 Nov 2010 15:10:57 +0000 (16:10 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 5 Nov 2010 15:10:57 +0000 (16:10 +0100)
src/device.c
src/network.c

index 16aa8d3..f1af675 100644 (file)
 #include <errno.h>
 #include <string.h>
 
-#include <gdbus.h>
-
 #include "connman.h"
 
-static DBusConnection *connection = NULL;
-
 struct connman_device {
        struct connman_element element;
        enum connman_device_type type;
@@ -1324,8 +1320,6 @@ int __connman_device_init(void)
 {
        DBG("");
 
-       connection = connman_dbus_get_connection();
-
        if (connman_storage_register(&device_storage) < 0)
                connman_error("Failed to register device storage");
 
@@ -1339,6 +1333,4 @@ void __connman_device_cleanup(void)
        connman_driver_unregister(&device_driver);
 
        connman_storage_unregister(&device_storage);
-
-       dbus_connection_unref(connection);
 }
index 53af57f..9365ed6 100644 (file)
@@ -26,8 +26,6 @@
 #include <errno.h>
 #include <string.h>
 
-#include <gdbus.h>
-
 #include "connman.h"
 
 static unsigned int hidden_counter = 0;
@@ -205,7 +203,6 @@ struct connman_network *connman_network_create(const char *identifier,
 
        __connman_element_initialize(&network->element);
 
-       //temp = connman_dbus_encode_string(identifier);
        if (identifier == NULL) {
                temp = g_strdup_printf("hidden_%d", hidden_counter++);
                network->hidden = TRUE;