Check RFKILL block state before enable the device
authorMartin Xu <martin.xu@intel.com>
Mon, 18 Jan 2010 07:27:17 +0000 (15:27 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 18 Jan 2010 08:48:29 +0000 (00:48 -0800)
commit0935c628cf83b096d72ffba5e53a6d6e8029e7ef
tree32e3402035f4ed83e7682615a27696c6fdab74d6
parent5fbfa700fb4b3ccdafd16343d02462f7ba408cee
Check RFKILL block state before enable the device

When starting, the device RFKILL block state will be recorded using
update_rfkill_state(). And at following device detection stage,
before enable the device, __connman_udev_get_blocked() should be
used to check the block state. If the device is blocked, it should
not be enabled. This avoids unnecessary enable and disable operation
and a race condition.
src/connman.h
src/device.c
src/udev-compat.c
src/udev.c