aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2009-04-11Fix device removal while there's an authorization request pendingJohan Hedberg
2009-04-11Add GDestroyNotify support to agent callbacksJohan Hedberg
2009-04-11Minor whitespace fixJohan Hedberg
2009-04-09Update alias once name is updated.Luiz Augusto von Dentz
2009-04-09Cleanup emit_device_found code.Luiz Augusto von Dentz
Remove duplicate code which both hcid_dbus_remote_name and hcid_dbus_inquiry_result have been using.
2009-04-09Simplify Manager.ListAdapters.Luiz Augusto von Dentz
By removing the unnecessary check we also make it more consistent with Manager.GetPropeties return for "Adapters".
2009-04-09Simplify Manager.FindAdapter.Luiz Augusto von Dentz
Manager.FindAdapter was doing unnecessary checks like which are already done before registering the adapters.
2009-04-09Introduce manager_find_adapter_by_address.Luiz Augusto von Dentz
2009-04-09Remove unnecessary function.Luiz Augusto von Dentz
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.
2009-04-09Don't change Powered property when changing scan mode.Luiz Augusto von Dentz
Powered property should be stricly associated with UP/DOWN state.
2009-04-08Fix Device.Connected property tracking when changing the Powered property.Johan Hedberg
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.
2009-04-07Fix errno string conversionJohan Hedberg
Numerous places were passing errno as a negative value to strerror which obviously gives a bogus error message. This patch fixes that.
2009-04-06Fix CancelDeviceCreation error return for an already existing deviceJohan Hedberg
2009-04-01Fix possible null pointer deference.Luiz Augusto von Dentz
2009-04-01Fix dead assignment.Luiz Augusto von Dentz
Value stored to 'dr' is never read.
2009-04-01Fix dead assignment.Luiz Augusto von Dentz
Value stored to 'dr' is never read.
2009-04-01Remove unused variable.Luiz Augusto von Dentz
2009-04-01Fix pattern matching logic on Manager.FindAdapter.Luiz Augusto von Dentz
Missing else if where causing dev_id to be overwrite in case of "any" or "00:00:00:00:00:00" patterns.
2009-04-01Fix null dereference in src/main.cGustavo F. Padovan
str could be null when dst isn't null
2009-03-26Remove unused defineJohan Hedberg
2009-03-26Remove invalid g_io_channel_shutdown callJohan Hedberg
2009-03-26Fix AttributeIdList parsingJohan Hedberg
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.
2009-03-25Also cache service class updates during adapter initializationJohan Hedberg
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.
2009-03-24Fix local class of device race conditions upon bluetoothd startupJohan Hedberg
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.
2009-03-24Only update service classes to specified adapterJohan Hedberg
2009-03-24Remove "append_and_grow" code and just use GStringBastien Nocera
Less code for us to maintain.
2009-03-24Remove unused functionJohan Hedberg
2009-03-24Cancel periodic inquiry at startupZygo Blaxell
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.
2009-03-24Handle case where inquiry is active when bluetoothd starts upZygo Blaxell
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.
2009-03-14Adding version check for plugins.Alok Barsode
2009-03-21Don't hide temporary devices on Adapter.ListDevices method.Luiz Augusto von Dentz
Adapter.ListDevices should be consistent with Adapter.Devices property.
2009-03-21Prevent duplicated adapter from being registered.Luiz Augusto von Dentz
2009-03-19Fix CancelDeviceCreation error to match the API descriptionJohan Hedberg
2009-03-18Attempt SDP a second time if we get ECONNRESETJohan Hedberg
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.
2009-03-15Add "Class" property to org.bluez.Adapter interface.Bea Lam
2009-03-11Use GCC visibility for exporting symbolsMarcel Holtmann
2009-03-15Include the Paired property in the DeviceFound signalsJohan Hedberg
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.
2009-03-12Make use of size_t and ssize_t when possibleJohan Hedberg
2009-03-01Remove incorrect sdp_record_free()Johan Hedberg
2009-02-27Don't call read scan enable if the adapter is powering downJohan Hedberg
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.
2009-02-26Always remember to free the extract_des internal listJohan Hedberg
The pSeq list needs to be fully free'd when extract_des returns an error.
2009-02-26Require all parsed elements in extract_des to be of the same typeJohan Hedberg
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.
2009-02-26Fix SDP data buffer parsingJohan Hedberg
This patch adds extra checks to make sure we never read past the end of the buffer.
2009-02-25Fix uninitialized memory warningJohan Hedberg
2009-02-25Remove unused path variableJohan Hedberg
2009-02-25Fix strncpy length parameters to avoid non-nul-terminated stringsJohan Hedberg
2009-02-24Fix a few more sdp_record_t memory leaksJohan Hedberg
2009-02-24Fix memory leakJohan Hedberg
2009-02-24Minor whitespace fixesJohan Hedberg
2009-02-24Fix typoJohan Hedberg