diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2012-10-25 10:54:57 +0300 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2012-10-25 16:18:30 +0300 |
commit | 8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64 (patch) | |
tree | 1a8eaa6dfa474769b0278baf507a272b760bff1d | |
parent | 08efe8080a1ba9982dc40446ebacc68bfb668041 (diff) | |
download | connman-8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64.tar.gz connman-8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64.tar.bz2 connman-8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64.zip |
technology: Do not presume a technology being hardblocked when created
This fixes an issue with the TechnologyAdded signal when the first
un-hardblock event occurs:
- when a technology was created, D-Bus registration was done and hardblock
was set to TRUE even if there was no evidence that the technology was
rfkill driven
- when the technology was updated to be rfkill driven, hardblock was already
set to TRUE and thus the technology was not unregistered
- when an rfkill event un-hardblocks the technology, the TechnologyAdded
signal was not sent since the technology was already registered to D-Bus
-rw-r--r-- | src/technology.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/technology.c b/src/technology.c index 290ec247..324a1036 100644 --- a/src/technology.c +++ b/src/technology.c @@ -920,7 +920,7 @@ static const GDBusSignalTable technology_signals[] = { static gboolean technology_dbus_register(struct connman_technology *technology) { if (technology->dbus_registered == TRUE || - (technology->rfkill_driven && + (technology->rfkill_driven == TRUE && technology->hardblocked == TRUE)) return TRUE; @@ -982,11 +982,7 @@ static struct connman_technology *technology_get(enum connman_service_type type) technology->rfkill_driven = FALSE; technology->softblocked = FALSE; - - if (type == CONNMAN_SERVICE_TYPE_ETHERNET) - technology->hardblocked = FALSE; - else - technology->hardblocked = TRUE; + technology->hardblocked = FALSE; technology->type = type; technology->path = g_strdup_printf("%s/technology/%s", |