summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-09-20 16:33:36 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-01 13:17:41 +0300
commitfa913d3900e820a5567d6044748d1e50d5c03bd0 (patch)
tree8e7b2486b01dc1a0b37e42672b3f31d4eec6ba1c /src
parent9d811818d9cd01869af99d394b310f67d3d17299 (diff)
downloadconnman-fa913d3900e820a5567d6044748d1e50d5c03bd0.tar.gz
connman-fa913d3900e820a5567d6044748d1e50d5c03bd0.tar.bz2
connman-fa913d3900e820a5567d6044748d1e50d5c03bd0.zip
technology: Update tethering properties when relevant
Diffstat (limited to 'src')
-rw-r--r--src/technology.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/src/technology.c b/src/technology.c
index 3fc7afc1..d78e7b3b 100644
--- a/src/technology.c
+++ b/src/technology.c
@@ -734,9 +734,17 @@ static DBusMessage *set_property(DBusConnection *conn,
if (strlen(str) < 1 || strlen(str) > 32)
return __connman_error_invalid_arguments(msg);
- g_free(technology->tethering_ident);
- technology->tethering_ident = g_strdup(str);
- technology_save(technology);
+ if (g_strcmp0(technology->tethering_ident, str) != 0) {
+ g_free(technology->tethering_ident);
+ technology->tethering_ident = g_strdup(str);
+ technology_save(technology);
+
+ connman_dbus_property_changed_basic(technology->path,
+ CONNMAN_TECHNOLOGY_INTERFACE,
+ "TetheringIdentifier",
+ DBUS_TYPE_STRING,
+ &technology->tethering_ident);
+ }
} else if (g_str_equal(name, "TetheringPassphrase") == TRUE) {
const char *str;
@@ -748,9 +756,17 @@ static DBusMessage *set_property(DBusConnection *conn,
if (strlen(str) < 8 || strlen(str) > 63)
return __connman_error_passphrase_required(msg);
- g_free(technology->tethering_passphrase);
- technology->tethering_passphrase = g_strdup(str);
- technology_save(technology);
+ if (g_strcmp0(technology->tethering_passphrase, str) != 0) {
+ g_free(technology->tethering_passphrase);
+ technology->tethering_passphrase = g_strdup(str);
+ technology_save(technology);
+
+ connman_dbus_property_changed_basic(technology->path,
+ CONNMAN_TECHNOLOGY_INTERFACE,
+ "TetheringPassphrase",
+ DBUS_TYPE_STRING,
+ &technology->tethering_passphrase);
+ }
} else if (g_str_equal(name, "Powered") == TRUE) {
connman_bool_t enable;