summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2012-10-25 07:54:57 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2012-10-25 13:18:30 (GMT)
commit8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64 (patch)
tree1a8eaa6dfa474769b0278baf507a272b760bff1d
parent08efe8080a1ba9982dc40446ebacc68bfb668041 (diff)
downloadconnman-8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64.zip
connman-8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64.tar.gz
connman-8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64.tar.bz2
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.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/technology.c b/src/technology.c
index 290ec24..324a103 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",