char *ident;
unsigned int connections;
guint scan_timeout;
+ struct connman_ipconfig *ipconfig;
struct connman_device_driver *driver;
void *driver_data;
DBG("element %p name %s", element, element->name);
+ if (device->timeout > 0) {
+ g_source_remove(device->timeout);
+ device->timeout = 0;
+ }
+
+ if (device->pending != NULL) {
+ dbus_message_unref(device->pending);
+ device->pending = NULL;
+ }
+
g_free(device->ident);
g_free(device->node);
g_free(device->name);
g_free(device->address);
g_free(device->interface);
+ connman_ipconfig_unref(device->ipconfig);
+
g_free(device->last_network);
g_hash_table_destroy(device->networks);
break;
}
+ device->ipconfig = connman_ipconfig_create();
+ if (device->ipconfig == NULL) {
+ connman_device_unref(device);
+ return NULL;
+ }
+
device->networks = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, unregister_network);
*/
void connman_device_unref(struct connman_device *device)
{
- if (device->timeout > 0) {
- g_source_remove(device->timeout);
- device->timeout = 0;
- }
-
- if (device->pending != NULL) {
- dbus_message_unref(device->pending);
- device->pending = NULL;
- }
-
connman_element_unref(&device->element);
}
char *name;
char *node;
char *group;
+ struct connman_ipconfig *ipconfig;
struct connman_network_driver *driver;
void *driver_data;
g_free(network->name);
g_free(network->address);
g_free(network->identifier);
+
+ connman_ipconfig_unref(network->ipconfig);
}
/**
network->secondary = FALSE;
network->identifier = g_strdup(identifier);
+ network->ipconfig = connman_ipconfig_create();
+ if (network->ipconfig == NULL) {
+ connman_network_unref(network);
+ return NULL;
+ }
+
return network;
}
char *name;
char *passphrase;
char *profile;
+ struct connman_ipconfig *ipconfig;
struct connman_device *device;
struct connman_network *network;
DBusMessage *pending;
if (service->network != NULL)
connman_network_unref(service->network);
+ connman_ipconfig_unref(service->ipconfig);
+
g_free(service->profile);
g_free(service->name);
g_free(service->passphrase);
__connman_service_initialize(service);
+ service->ipconfig = connman_ipconfig_create();
+ if (service->ipconfig == NULL) {
+ g_free(service);
+ return NULL;
+ }
+
return service;
}
return service;
}
- service = g_try_new0(struct connman_service, 1);
+ service = connman_service_create();
if (service == NULL)
return NULL;
DBG("service %p", service);
- __connman_service_initialize(service);
-
service->identifier = g_strdup(identifier);
service->profile = g_strdup(__connman_profile_active_ident());