projects
/
platform
/
upstream
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04589cd
)
dhcp: Reference count network properly
author
Jukka Rissanen
<jukka.rissanen@linux.intel.com>
Wed, 12 Oct 2011 13:41:46 +0000
(16:41 +0300)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 20 Oct 2011 17:27:25 +0000
(19:27 +0200)
src/dhcp.c
patch
|
blob
|
history
diff --git
a/src/dhcp.c
b/src/dhcp.c
index
10e1403
..
c6df4fa
100644
(file)
--- a/
src/dhcp.c
+++ b/
src/dhcp.c
@@
-468,6
+468,8
@@
int __connman_dhcp_start(struct connman_network *network, dhcp_cb callback)
dhcp->network = network;
dhcp->callback = callback;
+ connman_network_ref(network);
+
g_hash_table_replace(network_table, network, dhcp);
return dhcp_request(dhcp);
@@
-480,7
+482,8
@@
void __connman_dhcp_stop(struct connman_network *network)
if (network_table == NULL)
return;
- g_hash_table_remove(network_table, network);
+ if (g_hash_table_remove(network_table, network) == TRUE)
+ connman_network_unref(network);
}
int __connman_dhcp_init(void)