projects
/
profile
/
ivi
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12e6a9a
)
Set device before registering network
author
Marcel Holtmann
<marcel@holtmann.org>
Tue, 30 Dec 2008 21:58:41 +0000
(22:58 +0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Tue, 30 Dec 2008 21:58:41 +0000
(22:58 +0100)
src/device.c
patch
|
blob
|
history
diff --git
a/src/device.c
b/src/device.c
index
5b7ac4f
..
84be26e
100644
(file)
--- a/
src/device.c
+++ b/
src/device.c
@@
-836,12
+836,14
@@
int connman_device_add_network(struct connman_device *device,
if (device->mode == CONNMAN_DEVICE_MODE_NO_NETWORK)
return -EINVAL;
+ __connman_network_set_device(network, device);
+
err = connman_element_register((struct connman_element *) network,
&device->element);
- if (err < 0)
+ if (err < 0) {
+ __connman_network_set_device(network, NULL);
return err;
-
- __connman_network_set_device(network, device);
+ }
g_hash_table_insert(device->networks, g_strdup(identifier),
network);