In order to use peer_changed() callback also for peer's property
changed, let's rename GSupplicantPeerGroupState to GSupplicantPeerState
which then becomes semantically more generic.
---
 gsupplicant/gsupplicant.h | 4 ++--
 gsupplicant/supplicant.c  | 2 +-
 plugins/wifi.c            | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h
index 62c6adb..ca4f05d 100644
--- a/gsupplicant/gsupplicant.h
+++ b/gsupplicant/gsupplicant.h
@@ -126,7 +126,7 @@ typedef enum {
        G_SUPPLICANT_PEER_GROUP_JOINED,
        G_SUPPLICANT_PEER_GROUP_DISCONNECTED,
        G_SUPPLICANT_PEER_GROUP_FAILED,
-} GSupplicantPeerGroupState;
+} GSupplicantPeerState;
 
 struct _GSupplicantSSID {
        const void *ssid;
@@ -348,7 +348,7 @@ struct _GSupplicantCallbacks {
        void (*peer_found) (GSupplicantPeer *peer);
        void (*peer_lost) (GSupplicantPeer *peer);
        void (*peer_changed) (GSupplicantPeer *peer,
-                                       GSupplicantPeerGroupState state);
+                                       GSupplicantPeerState state);
        void (*peer_request) (GSupplicantPeer *peer);
        void (*debug) (const char *str);
 };
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 8d19b6d..298f2a9 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -495,7 +495,7 @@ static void callback_peer_lost(GSupplicantPeer *peer)
 }
 
 static void callback_peer_changed(GSupplicantPeer *peer,
-                                       GSupplicantPeerGroupState state)
+                                               GSupplicantPeerState state)
 {
        if (!callbacks_pointer)
                return;
diff --git a/plugins/wifi.c b/plugins/wifi.c
index e714fe1..db76535 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -2660,8 +2660,7 @@ static void peer_lost(GSupplicantPeer *peer)
        }
 }
 
-static void peer_changed(GSupplicantPeer *peer,
-                                       GSupplicantPeerGroupState state)
+static void peer_changed(GSupplicantPeer *peer, GSupplicantPeerState state)
 {
        GSupplicantInterface *iface = g_supplicant_peer_get_interface(peer);
        struct wifi_data *wifi = g_supplicant_interface_get_data(iface);
-- 
1.8.5.5

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

Reply via email to