[PATCH 05/12] session: do not notify ipconfig content if it's not in a connected state

Tomasz Bursztyka tomasz.bursztyka at linux.intel.com
Wed Feb 8 06:13:04 PST 2012


---
 src/session.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/session.c b/src/session.c
index 04cc972..ab44813 100644
--- a/src/session.c
+++ b/src/session.c
@@ -341,6 +341,10 @@ static void append_ipconfig_ipv4(DBusMessageIter *iter, void *user_data)
 	if (service == NULL)
 		return;
 
+	if (__connman_service_is_connected_state(service,
+				CONNMAN_IPCONFIG_TYPE_IPV4) == FALSE)
+		return;
+
 	ipconfig_ipv4 = __connman_service_get_ip4config(service);
 	if (ipconfig_ipv4 == NULL)
 		return;
@@ -356,6 +360,10 @@ static void append_ipconfig_ipv6(DBusMessageIter *iter, void *user_data)
 	if (service == NULL)
 		return;
 
+	if (__connman_service_is_connected_state(service,
+				CONNMAN_IPCONFIG_TYPE_IPV6) == FALSE)
+		return;
+
 	ipconfig_ipv4 = __connman_service_get_ip4config(service);
 	ipconfig_ipv6 = __connman_service_get_ip6config(service);
 	if (ipconfig_ipv6 == NULL)
-- 
1.7.8.4




More information about the connman mailing list