[PATCH 5/6] wifi: Set the MAC address of the distant peer

2015-01-09 Thread Tomasz Bursztyka
This will be useful in the core to relate the peer and its dhcp lease,
in case the local peer ends up as the dhcp server.
---
 plugins/wifi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index 9357b92..68ed5d0 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2787,9 +2787,8 @@ static void peer_changed(GSupplicantPeer *peer, 
GSupplicantPeerState state)
p_state = CONNMAN_PEER_STATE_IDLE;
break;
case G_SUPPLICANT_PEER_GROUP_JOINED:
-   if (!g_supplicant_peer_is_in_a_group(peer))
-   break;
-   p_state = CONNMAN_PEER_STATE_READY;
+   connman_peer_set_iface_address(connman_peer,
+   g_supplicant_peer_get_iface_address(peer));
break;
case G_SUPPLICANT_PEER_GROUP_DISCONNECTED:
p_state = CONNMAN_PEER_STATE_IDLE;
-- 
2.0.4

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH 5/6] wifi: Set the MAC address of the distant peer

2015-01-08 Thread Tomasz Bursztyka
This will be useful in the core to relate the peer and its dhcp lease,
in case the local peer ends up as the dhcp server.
---
 plugins/wifi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/plugins/wifi.c b/plugins/wifi.c
index 9357b92..ddb07e0 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2789,6 +2789,8 @@ static void peer_changed(GSupplicantPeer *peer, 
GSupplicantPeerState state)
case G_SUPPLICANT_PEER_GROUP_JOINED:
if (!g_supplicant_peer_is_in_a_group(peer))
break;
+   connman_peer_set_iface_address(connman_peer,
+   g_supplicant_peer_get_iface_address(peer));
p_state = CONNMAN_PEER_STATE_READY;
break;
case G_SUPPLICANT_PEER_GROUP_DISCONNECTED:
-- 
2.0.4

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman