From: Tomasz Bursztyka Date: Thu, 25 Oct 2012 07:54:57 +0000 (+0300) Subject: technology: Do not presume a technology being hardblocked when created X-Git-Tag: 1.9~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ef63a778b0bef3e67c9d6e4cd22ea4061f8be64;p=platform%2Fupstream%2Fconnman.git 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 --- 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",