From 7fb85fcd87d63c4e1c8d113eb58e7aabb597bd6d Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Mon, 25 Mar 2013 12:32:42 +0200 Subject: [PATCH] service: Only send correct ipconfig changed signal If we are changing IPv4 config, then send only IPv4 changed signal and not the IPv6 one. Same is done for IPv6 config when it changes. --- src/service.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/service.c b/src/service.c index e0bf409..e93b708 100644 --- a/src/service.c +++ b/src/service.c @@ -1757,16 +1757,21 @@ static void append_provider(DBusMessageIter *iter, void *user_data) static void settings_changed(struct connman_service *service, struct connman_ipconfig *ipconfig) { + enum connman_ipconfig_type type; + if (allow_property_changed(service) == FALSE) return; - connman_dbus_property_changed_dict(service->path, - CONNMAN_SERVICE_INTERFACE, "IPv4", - append_ipv4, service); + type = __connman_ipconfig_get_config_type(ipconfig); - connman_dbus_property_changed_dict(service->path, + if (type == CONNMAN_IPCONFIG_TYPE_IPV4) + connman_dbus_property_changed_dict(service->path, + CONNMAN_SERVICE_INTERFACE, "IPv4", + append_ipv4, service); + else if (type == CONNMAN_IPCONFIG_TYPE_IPV6) + connman_dbus_property_changed_dict(service->path, CONNMAN_SERVICE_INTERFACE, "IPv6", - append_ipv6, service); + append_ipv6, service); __connman_notifier_ipconfig_changed(service, ipconfig); } -- 2.7.4