From 8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Thu, 25 Oct 2012 10:54:57 +0300 Subject: 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 --- src/technology.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/technology.c') 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", -- cgit v1.2.3