Technology's update function wasn't called with VPN services, so now
always call it from service's update function.
---
src/main.c | 2 +-
src/service.c | 2 ++
src/technology.c | 8 +++-----
src/technology.h | 3 +--
4 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/main.c b/src/main.c
index c9bfd31..d1c5620 100644
--- a/src/main.c
+++ b/src/main.c
@@ -231,7 +231,7 @@ void modify_service(GDBusConnection *connection, const
gchar *path,
add_service(connection, path, properties);
return;
}
- technology_update_service(technologies[type], serv, properties);
+ service_update(serv, properties);
}
}
diff --git a/src/service.c b/src/service.c
index d21aabe..bd3cd63 100644
--- a/src/service.c
+++ b/src/service.c
@@ -95,6 +95,8 @@ void service_update_property(struct service *serv, const
gchar *key,
set_label(serv, serv->ipv6, "IPv6", "Address");
set_label(serv, serv->ipv6gateway, "IPv6", "Gateway");
set_label(serv, serv->mac, "Ethernet", "Address");
+
+ technology_service_updated(serv->tech, serv);
}
void service_update(struct service *serv, GVariant *properties)
diff --git a/src/technology.c b/src/technology.c
index b3a59f3..a712402 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -417,12 +417,10 @@ void technology_add_service(struct technology *item,
struct service *serv)
g_hash_table_insert(item->services, g_strdup(serv->path), serv);
}
-void technology_update_service(struct technology *item, struct service *serv,
- GVariant *properties)
+void technology_service_updated(struct technology *item, struct service *serv)
{
- service_update(serv, properties);
- if(item->settings->selected == serv);
- update_connect_button(item->settings);
+ if(item->settings->selected == serv)
+ update_connect_button(item->settings);
}
void technology_remove_service(struct technology *item, const gchar *path)
diff --git a/src/technology.h b/src/technology.h
index 026e719..69cd26f 100644
--- a/src/technology.h
+++ b/src/technology.h
@@ -84,8 +84,7 @@ void technology_init(struct technology *tech, GVariant
*properties_v,
void technology_property_changed(struct technology *item, const gchar *key);
void technology_services_updated(struct technology *item);
void technology_add_service(struct technology *item, struct service *serv);
-void technology_update_service(struct technology *item, struct service *serv,
- GVariant *properties);
+void technology_service_updated(struct technology *item, struct service *serv);
void technology_remove_service(struct technology *item, const gchar *path);
void technology_set_property(struct technology *item, const gchar *key,
GVariant *value);
--
2.1.0
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman