This time based on the kernel exported DMI, rather than calling
out to HAL. The HAL plugin can still be preferred with
--enable-hal=yes passed to configure.
This cause problems since the number of open file descriptors are
normaly limited causing errors such as:
Can't create RFCOMM TTY: Too many open files in system
Since bluetoothd power cycles the adapter at startup, it is possible
that the plugin gets a reply from reading the state of the MCE and
tries to power the adapter before it is down. The patch checks for
that situation and if it occurs postpones powering the adapter to
the powered state callback.
Fast connectable switches between two sets of parameters to enable
or disable fast page scan mode. Page scan interval and page scan
type are changed to speed up connectabily when needed. When
disabled it sets default values. List of btd_adapter_ops is updated
respectively.
Registers a callback to btd_adapter to get notified when the
powered state of the adapter is changed. This is needed to update
the state stored in the MCE if the adapter is powered on or off
using for example SetProperty(Powered). The current setting of
the MCE is saved in a variable and if the notification to the
plugin does not match this value the MCE is updated accordingly
using its DBus method for setting radio states.
We can't call g_remove_source for the child watch since then nobody will
call waitpid when the child dies. Instead set client->child_pid to 0
after sending SIGTERM so that the child watch function doesn't try to do
cleanup to processes that were already cleared (e.g. if an old phonet-at
process stays around while a new DUN client gets connected).
The patch is based upon the initial investigation and findings by
Dmitriy Paliy <dmitriy.paliy@nokia.com>.
The code used to create the port stored the id in a local variable
instead of storing it in the client data which is used to release the
port once disconnected.
Make sure bluetoothd completely ignores any adapters with the RAW flag
set. This means that neither start_security_manager nor
manager_start_adapter should be called for such an adapter.
Adds a plugin for listening to the MCE (Mode Control Entity)
radio state signal. Implemented in a new source file,
configuration flag for enabling it added to the build files.
The plugin registers an adapter driver containing a DBus signal
watch for receiving MCE_RADIO_STATES_SIG messages. On receiving
the signal, it sets the powered state of the adapter according
to the Bluetooth field.
In order to avoid race conditions for setting the Class of Device
asynchronously a queuing mechanism is needed. This patch implements that
by having the following variables in the adapter struct:
adapter->current_cod
The currently set CoD
adapter->pending_cod
CoD of a hci_write_cod command which didn't complete yet.
adapter->wanted_cod
The CoD value that is ultimately desired but might not
have been set yet.