[PATCH] station: register BSS before adding to ESS

Vignesh Raman <[email protected]>
Newsgroups dev.linux.lists.iwd
Message-ID <[email protected]>
The network points to its BSSes through ExtendedServiceSet, but a
BSS does not point back to the network. So the BSS object should be
published on D-Bus first, then added to the network's list. Doing it
the other way round briefly exposes a BSS path on D-Bus before the
object it points to exists.
---
 src/station.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/station.c b/src/station.c
index 8fcf8c70..8b9ca565 100644
--- a/src/station.c
+++ b/src/station.c
@@ -646,8 +646,9 @@ static struct network *station_add_seen_bss(struct station *station,
 			network_get_ssid(network), security_to_str(security));
 	}
 
+	/* Publish the BasicServiceSet object before it's referenced in ExtendedServiceSet. */
+	station_register_bss(network, bss);
 	network_bss_add(network, bss);
-	station_register_bss(network, bss);
 
 	return network;
 }
-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.