Peer's lookup is done in wifi plugin and not anymore in gsupplicant part. --- plugins/wifi.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/plugins/wifi.c b/plugins/wifi.c index e789f8c..95bc458 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -305,7 +305,9 @@ static int peer_disconnect(struct connman_peer *peer) { struct connman_device *device = connman_peer_get_device(peer); GSupplicantPeerParams peer_params = {}; + GSupplicantPeer *gs_peer; struct wifi_data *wifi; + int ret; DBG("peer %p", peer); @@ -316,10 +318,18 @@ static int peer_disconnect(struct connman_peer *peer) if (!wifi) return -ENODEV; - peer_params.identifier = connman_peer_get_identifier(peer); + gs_peer = g_supplicant_interface_peer_lookup(wifi->interface, + connman_peer_get_identifier(peer)); + if (!gs_peer) + return -EINVAL; + + peer_params.path = g_strdup(g_supplicant_peer_get_path(gs_peer)); - return g_supplicant_interface_p2p_disconnect(wifi->interface, + ret = g_supplicant_interface_p2p_disconnect(wifi->interface, &peer_params); + g_free(peer_params.path); + + return ret; } static struct connman_peer_driver peer_driver = { -- 1.8.5.5 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman