Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Remove duplicate code which both hcid_dbus_remote_name and
hcid_dbus_inquiry_result have been using.
|
|
By removing the unnecessary check we also make it more consistent with
Manager.GetPropeties return for "Adapters".
|
|
Manager.FindAdapter was doing unnecessary checks like which are already
done before registering the adapters.
|
|
|
|
There is no need to find_by_address to exist since manager_find_adapter is
doing the same, also find_by_address does unnecessary check and syscalls.
|
|
Powered property should be stricly associated with UP/DOWN state.
|
|
The connected devices list wasn't properly cleared when setting Powered to off
and so neither Connected=false nor Connected=true got emited when toggling the
Powered state. This patch fixes this by calling adapter_remove_connection for
each device in the adapter->connections list.
|
|
Numerous places were passing errno as a negative value to strerror which
obviously gives a bogus error message. This patch fixes that.
|
|
|
|
|
|
Value stored to 'dr' is never read.
|
|
Value stored to 'dr' is never read.
|
|
|
|
Missing else if where causing dev_id to be overwrite in case of "any" or
"00:00:00:00:00:00" patterns.
|
|
str could be null when dst isn't null
|
|
|
|
|
|
The attribute ID list can have a mix of uint16 elements (a single attribute id)
and uint32 elements (a range of attribute id's). The extract_des function was
created with the assumption that lists passed to it always contain only one
data type so extracting the attribute id list with it hasn't been possible.
Before commit 02cd65fff0eac590c55968509c9023b691c69245 the SDP code would
access invalid memory in the case of attribute id lists with mixed data types
and after that commit the code would return a "invalid syntax" error to the SDP
client (which is also not good). This patch adds a new struct to describe an
element of this list so that the extract_attrs function is able to correctly
parse each element.
|
|
It turns out that the original bluetoothd startup tracking patch isn't enough
to ensure that the service classes get updated correctly. In addition to that
the service class caching should also occur during adapter initialization.
|
|
The bluetoothd startup sequence is quite fragile and easily susceptible to race
conditions. The problematic variable that this patch fixes is
adapter->dev.class which depends on at least one write_class_of_dev_complete
event. If e.g. a write_scan_complete comes before this the
set_limited_discoverable function would attempt to set the wrong class of
device (essentially leaving out the service class bits completely).
What this patch does is adds tracking to when bluetoothd is still starting up
and caches the changes to the service classes right until the very moment when
it enters the main loop.
|
|
|
|
Less code for us to maintain.
|
|
|
|
If periodic inquiry is active when bluetoothd starts up, it will get an
error from the HCI layer when it tries to execute the StartDiscovery
dbus call. This error in turn will prevent the list of devices which
have been discovered and reported over dbus from being cleared, which
will make many devices undiscoverable.
This patch handles the case where the adapter is in periodic inquiry
mode at startup. It issues a command to cancel periodic inquiry at
startup if the adapter is not known to be in standard inquiry mode,
hasn't been initialized yet and not DOWN when bluetoothd started.
|
|
If inquiry is active when bluetoothd starts up, it will get an error
from the HCI layer when it tries to execute the StartDiscovery dbus
call. This error in turn will prevent the list of devices which have
been discovered and reported over dbus from being cleared, which will
make many devices undiscoverable.
This patch handles the case where the adapter is in standard inquiry
mode. It checks for the HCI_INQUIRY status bit at startup, and if set,
issues an inquiry_cancel call.
|
|
|
|
Adapter.ListDevices should be consistent with Adapter.Devices property.
|
|
|
|
|
|
When acting as acceptors for pairing and doing reverse SDP we might get
ECONNRESET if the remote device drops the ACL just as we're starting our
SDP connect. This patch adds a second SDP connect attempt if we get this
specific error.
|
|
|
|
|
|
Include the Paired property in the DeviceFound signals so that a UI
doesn't have to do any special lookups to know if the device is paired
or not.
|
|
|
|
|
|
When powering down we explicitly set the scan mode to 0 before calling
the HCI_DEVDOWN ioctl. To avoid HCI command timeouts track this
situation and don't call read scan enable in dbus-hci.c when the command
complete for the write scan enable arrives.
|
|
The pSeq list needs to be fully free'd when extract_des returns an
error.
|
|
The extract_des function returns just one element type to the caller so
if there are mixed elements it'll be impossible for the caller to know
how to handle the returned list.
|
|
This patch adds extra checks to make sure we never read past the end of
the buffer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|