summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-03-25 12:32:42 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-03-25 14:08:48 +0200
commit7fb85fcd87d63c4e1c8d113eb58e7aabb597bd6d (patch)
tree9f483748ac688de85992ca164c410ccf2244735e /src
parentbd320a31a4939c43976726fbb201b1ad6c752b13 (diff)
downloadconnman-7fb85fcd87d63c4e1c8d113eb58e7aabb597bd6d.tar.gz
connman-7fb85fcd87d63c4e1c8d113eb58e7aabb597bd6d.tar.bz2
connman-7fb85fcd87d63c4e1c8d113eb58e7aabb597bd6d.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/service.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/service.c b/src/service.c
index e0bf409b..e93b708b 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);
}