GSList *scan_pending;
+ connman_bool_t rfkill_driven;
connman_bool_t hardblocked;
connman_bool_t dbus_registered;
};
struct connman_technology *technology = list->data;
if (technology->path == NULL ||
- technology->hardblocked == TRUE)
+ (technology->rfkill_driven == TRUE &&
+ technology->hardblocked == TRUE))
continue;
dbus_message_iter_open_container(array, DBUS_TYPE_STRUCT,
DBusMessage *reply = NULL;
int err = 0;
- if (technology->hardblocked == TRUE) {
+ if (technology->rfkill_driven && technology->hardblocked == TRUE) {
err = -EACCES;
goto make_reply;
}
static gboolean technology_dbus_register(struct connman_technology *technology)
{
if (technology->dbus_registered == TRUE ||
- technology->hardblocked == TRUE)
+ (technology->rfkill_driven &&
+ technology->hardblocked == TRUE))
return TRUE;
if (g_dbus_register_interface(connection, technology->path,
technology->refcount = 1;
+ technology->rfkill_driven = FALSE;
+
if (type == CONNMAN_SERVICE_TYPE_ETHERNET)
technology->hardblocked = FALSE;
else
if (technology == NULL)
return -ENXIO;
+ technology->rfkill_driven = TRUE;
+
technology_apply_hardblock_change(technology, hardblock);
/*