OSDN Git Service

android-x86/external-bluetooth-bluez.git
11 years agodevice: Add device_name_known convenience function
Johan Hedberg [Thu, 11 Oct 2012 10:07:32 +0000 (12:07 +0200)]
device: Add device_name_known convenience function

11 years agodevice: Add LegacyPairing and RSSI properties
Johan Hedberg [Thu, 11 Oct 2012 08:42:16 +0000 (10:42 +0200)]
device: Add LegacyPairing and RSSI properties

These are needed for the new device discovery where we create objects
for each found device.

11 years agorctest: add option to save received data to file
Gustavo Padovan [Mon, 8 Oct 2012 03:50:03 +0000 (11:50 +0800)]
rctest: add option to save received data to file

works only for automated test option for now

11 years agorctest: add automated test
Gustavo Padovan [Mon, 8 Oct 2012 03:50:02 +0000 (11:50 +0800)]
rctest: add automated test

adds -a option to enable automated tests. We use the -i option to define
the receiving side and the -a define the sending side:

./rctest -i hci0 -a hci1

11 years agogdbus: Add support for invalidated properties
Johan Hedberg [Thu, 11 Oct 2012 09:53:27 +0000 (11:53 +0200)]
gdbus: Add support for invalidated properties

If there's a pending property but its exists() callback returns false
the property should be considered invalidated and included in the
relevant list of the PropertiesChanged signal.

11 years agohog: Fix passing NULL pointer to g_attrib_unregister
Johan Hedberg [Thu, 11 Oct 2012 12:03:41 +0000 (15:03 +0300)]
hog: Fix passing NULL pointer to g_attrib_unregister

The hogdev->attrib pointer can be NULL if we got disconnected.

11 years agohog: Fix requested range for descriptor discovery
João Paulo Rechi Vita [Thu, 11 Oct 2012 05:31:23 +0000 (02:31 -0300)]
hog: Fix requested range for descriptor discovery

When discovering descriptors of the last characteristic of a service the
discovery range was exceeding the service limits. This commit keeps the
discovery within the limits of the HoG service.

11 years agohog: Fix characteristic descriptor discovery
João Paulo Rechi Vita [Thu, 11 Oct 2012 05:31:22 +0000 (02:31 -0300)]
hog: Fix characteristic descriptor discovery

The discover descriptors sub-procedure is complete when the error
response is received and the error code is set to "Attribute Not Found"
or the find information response has an attribute handle that is equal
to the last handle in the request. This commit fixes the stop condition
for characteristic descriptor discovery.

11 years agocore: Fix connecting to an already connected device on pairing
João Paulo Rechi Vita [Thu, 11 Oct 2012 05:30:46 +0000 (02:30 -0300)]
core: Fix connecting to an already connected device on pairing

11 years agotest: Add support for passing address type to btiotest
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:56:43 +0000 (20:56 -0300)]
test: Add support for passing address type to btiotest

11 years agogas: Add the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:57 +0000 (20:55 -0300)]
gas: Add the per handle GATT event notifier

11 years agoheartrate: Use the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:56 +0000 (20:55 -0300)]
heartrate: Use the per handle GATT event notifier

11 years agohog: Use the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:55 +0000 (20:55 -0300)]
hog: Use the per handle GATT event notifier

11 years agoscan: Use the per handle GATT event notifier
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:54 +0000 (20:55 -0300)]
scan: Use the per handle GATT event notifier

11 years agogattrib: Add support for listening for events for specific handles
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:55:53 +0000 (20:55 -0300)]
gattrib: Add support for listening for events for specific handles

We want only the profile that implements a service to be notified of
changes on that service. Before this patch, all the registered event
notifiers are being called.

11 years agogas: Only do the Exchange MTU procedure over LE links
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:03 +0000 (20:35 -0300)]
gas: Only do the Exchange MTU procedure over LE links

The Exchange MTU procedure should only be performed over LE links,
we are using the check of the Channel ID used to verify this.

11 years agoattrib: Fix not checking if att_data_list_alloc fails
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:02 +0000 (20:35 -0300)]
attrib: Fix not checking if att_data_list_alloc fails

Now that this function may fail in more usual situations (invalid
input), we have to check its return value.

11 years agoatt: Fix sending pdu's with invalid data
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:01 +0000 (20:35 -0300)]
att: Fix sending pdu's with invalid data

When encoding an att_data_list we need to make sure that each element
lenght of the data list will not exceed 255, because that information
will be encoded as a octet later.

11 years agoatt: Replace ATT_MAX_MTU with ATT_MAX_VALUE_LEN
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:35:00 +0000 (20:35 -0300)]
att: Replace ATT_MAX_MTU with ATT_MAX_VALUE_LEN

ATT has the concept that an attribute value has a maximum length and we
weren't keeping track of this.

11 years agoattrib: Remove all the usages of ATT_MAX_MTU
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:34:59 +0000 (20:34 -0300)]
attrib: Remove all the usages of ATT_MAX_MTU

This "define" was bogus for two reasons: 1. There's no concept
of maximum MTU in the ATT level; 2. It was used as a maximum attribute
value length.

11 years agogattrib: Fix ignoring the error message when write fails
Vinicius Costa Gomes [Wed, 10 Oct 2012 23:34:58 +0000 (20:34 -0300)]
gattrib: Fix ignoring the error message when write fails

If an error happens during writing to the socket, we should complain
that it failed.

11 years agoevent: Use bool instead gboolean for legacy parameter
Szymon Janc [Wed, 10 Oct 2012 13:19:58 +0000 (15:19 +0200)]
event: Use bool instead gboolean for legacy parameter

This will avoid mixing bool and gboolean in btd_event_device_found
definition. Whole execution chain for legacy parameter is also
converted to bool type.

11 years agocore: Pass confirm name as bool value
Szymon Janc [Wed, 10 Oct 2012 13:19:57 +0000 (15:19 +0200)]
core: Pass confirm name as bool value

confirm_name is a boolean value and can be pass as such instead of
uint8_t.

11 years agoaudio: Remove redundant procedure when a2dp connect
Chan-yeol Park [Tue, 9 Oct 2012 11:35:48 +0000 (20:35 +0900)]
audio: Remove redundant procedure when a2dp connect

This patch fixes the bug that when remote host is down a2dp connection failure
is handled like XCASE

11 years agoaudio: Fix audio driver is not probed
Chan-yeol Park [Tue, 9 Oct 2012 11:35:47 +0000 (20:35 +0900)]
audio: Fix audio driver is not probed

This patch fix the bugs that when handling an AVDTP incoming connection,
audio-a2dp driver is not probed because advanced audio UUID is missed.

11 years agoavinfo: Print a2dp vendor codec info
Chan-yeol Park [Tue, 9 Oct 2012 11:35:46 +0000 (20:35 +0900)]
avinfo: Print a2dp vendor codec info

11 years agoavinfo: Replace definitions with a2dp-codecs.h's
Chan-yeol Park [Tue, 9 Oct 2012 11:35:45 +0000 (20:35 +0900)]
avinfo: Replace definitions with a2dp-codecs.h's

11 years agoaudio: Add check for vendor specific A2DP codec
Chan-yeol Park [Tue, 9 Oct 2012 11:35:44 +0000 (20:35 +0900)]
audio: Add check for vendor specific A2DP codec

This patch adds checks(vendor ID, vendor specific codec ID) to make sure of
vendor specific A2DP codec selection.

11 years agobuild-sys: Remove leftover AM_YFLAGS
Lucas De Marchi [Tue, 9 Oct 2012 17:51:17 +0000 (14:51 -0300)]
build-sys: Remove leftover AM_YFLAGS

11 years agocore: fix stop scanning after GCEP
João Paulo Rechi Vita [Tue, 9 Oct 2012 17:38:27 +0000 (14:38 -0300)]
core: fix stop scanning after GCEP

The session type identification on struct session req (commit 328661a0)
broke the stop condition of the LE Genereal Connection Establishment
Procedure. This commit creates new identificators for discovery sessions
and makes their naming a bit more clear.

11 years agocore: Add initial Device.Pair() implementation
Johan Hedberg [Tue, 9 Oct 2012 17:38:07 +0000 (19:38 +0200)]
core: Add initial Device.Pair() implementation

This will ultimately replace Adapter.CreatePairedDevice()

11 years agobuild: Add missing documentation files to EXTRA_DIST
Andrzej Kaczmarek [Tue, 9 Oct 2012 13:51:47 +0000 (15:51 +0200)]
build: Add missing documentation files to EXTRA_DIST

This patch adds missing documentation files to EXTRA_DIST variable so
they are included when creating tarball.

11 years agosink: Remove deprecated code
Luiz Augusto von Dentz [Tue, 9 Oct 2012 16:03:53 +0000 (18:03 +0200)]
sink: Remove deprecated code

Remove decrecated properties and signals

11 years agoaudio: Fix memory leak of AVDTP buffer
Luiz Augusto von Dentz [Tue, 9 Oct 2012 16:03:52 +0000 (18:03 +0200)]
audio: Fix memory leak of AVDTP buffer

Upon disconnection all references to AVDTP session should be release
otherwise the data associate with it cannot be freed and new connection
may overwrite the buf pointer causing it to leak.

11 years agodevice: Remove not used device_set_class function
Szymon Janc [Tue, 9 Oct 2012 12:12:02 +0000 (14:12 +0200)]
device: Remove not used device_set_class function

With mgmt interface CoD cannot change as it is only received in EIR when
device is discovered or connected. Was only used in
btd_event_remote_class which is now removed.

11 years agoadapter: Remove not used btd_adapter_switch_{online,offline} functions
Szymon Janc [Tue, 9 Oct 2012 12:12:01 +0000 (14:12 +0200)]
adapter: Remove not used btd_adapter_switch_{online,offline} functions

Were used only in Maemo plugin which is now removed.

11 years agostorage: Remove not used read_remote_features
Szymon Janc [Tue, 9 Oct 2012 12:12:00 +0000 (14:12 +0200)]
storage: Remove not used read_remote_features

It was only usefull with hciops.

11 years agostorage: Remove not used write_features_info
Szymon Janc [Tue, 9 Oct 2012 12:11:59 +0000 (14:11 +0200)]
storage: Remove not used write_features_info

This was used in hciops.

11 years agostorage: Remove not used write_version_info
Szymon Janc [Tue, 9 Oct 2012 12:11:58 +0000 (14:11 +0200)]
storage: Remove not used write_version_info

This was used in hciops only.

11 years agostorage: Remove not used read_remote_eir
Szymon Janc [Tue, 9 Oct 2012 12:11:57 +0000 (14:11 +0200)]
storage: Remove not used read_remote_eir

This function is not used. Previously it was used to determine if
remote device is legacy or not.

11 years agoevent: Don't store EIR in btd_event_device_found
Szymon Janc [Tue, 9 Oct 2012 12:11:56 +0000 (14:11 +0200)]
event: Don't store EIR in btd_event_device_found

It is never read and was usefull only to gather EIR data for testing
which can also be done with hcidump etc.

11 years agoSimplify checking if found device is legacy
Szymon Janc [Tue, 9 Oct 2012 12:11:54 +0000 (14:11 +0200)]
Simplify checking if found device is legacy

This simplify code by removing pairing_is_legacy() function which was
always returning FALSE due to EIR being always present with mgmt
interface (this also fix small issue when first DeviceFound signal
emitted for legacy device was having LegacyPairing set to false).

Instead of using btd_event_set_legacy_pairing to set legacy pairing in
remote_dev_info handle it in similar way to rssi.

11 years agodoc: Reformat thermometer-api.txt to follow 80-character rule
Johan Hedberg [Tue, 9 Oct 2012 15:58:40 +0000 (17:58 +0200)]
doc: Reformat thermometer-api.txt to follow 80-character rule

11 years agothermometer: Fix missing braces
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:58 +0000 (13:19 +0200)]
thermometer: Fix missing braces

11 years agothermometer: Fix indentation
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:57 +0000 (13:19 +0200)]
thermometer: Fix indentation

11 years agothermometer: Fix whitespace
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:56 +0000 (13:19 +0200)]
thermometer: Fix whitespace

11 years agothermometer: Refactor processing of measurement characteristic value
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:55 +0000 (13:19 +0200)]
thermometer: Refactor processing of measurement characteristic value

Data buffer is read by simply moving buffer pointer instead of calculating
indexes of consecutive fields. This makes function flow easier to follow
as there's no need to care about presence of fields prior to current when
reading data.

11 years agothermometer: Add common function to write characteristics CCC
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:54 +0000 (13:19 +0200)]
thermometer: Add common function to write characteristics CCC

There are now few separate functions to write CCC for measurement
characteristics which looks similar. This patch adds common function
to write given value into CCC for given characteristics and leaves
dedicated functions to act only as simple wrappers.

11 years agothermometer: Add constant definition for watcher interface name
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:53 +0000 (13:19 +0200)]
thermometer: Add constant definition for watcher interface name

11 years agothermometer: Update driver naming style
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:52 +0000 (13:19 +0200)]
thermometer: Update driver naming style

This patch changes device probe and remove functions name to include
'device' rather than 'driver' name as it better describes what both
do.

Also profile driver name is changed to better describe that it's now
profile driver rather than device driver only.

11 years agothermometer: Change string properties to lower-case
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:51 +0000 (13:19 +0200)]
thermometer: Change string properties to lower-case

11 years agothermometer: Reformat MeasurementReceived description
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:50 +0000 (13:19 +0200)]
thermometer: Reformat MeasurementReceived description

MeasurementReceived method description is reformatted to be more
readable and consistent with other API documents.

Special values for Exponent and Mantissa fields specify now only NaN
value as this is only special value defined by HTS specification for
measurement.

11 years agothermometer: Update test script
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:49 +0000 (13:19 +0200)]
thermometer: Update test script

11 years agothermometer: Update API document
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:48 +0000 (13:19 +0200)]
thermometer: Update API document

This patch updates Thermometer API document to reflect changes in
Thermometer interface and introduction of ThermometerManager
interface and fixes minor formatiing inconsistencies.

11 years agothermometer: Include remote device information in MeasurementReceived
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:47 +0000 (13:19 +0200)]
thermometer: Include remote device information in MeasurementReceived

Since watchers are now registered per-adapter it's necessary to include
remote device information in MeasurementReceived callback.

This patch adds parameter to MeasurementReceived method which is an
object path to remote device object.

11 years agothermometer: Move watcher logic to adapter interface
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:46 +0000 (13:19 +0200)]
thermometer: Move watcher logic to adapter interface

This patch moves watcher related methods to ThermometerManager interface
so watchers can be registered per-adapter instead of per-device.

Final measurement notifications are now enabled on all devices connected
to given adapter when first watcher is registered and disabled when last
watcher is unregistered.

Intermediate measurement notifications are enabled for all devices
connected to given adapter which support this feature.

11 years agothermometer: Register ThermometerManager interface on adapter path
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:45 +0000 (13:19 +0200)]
thermometer: Register ThermometerManager interface on adapter path

11 years agothermometer: Store thermometer devices per-adapter
Andrzej Kaczmarek [Tue, 9 Oct 2012 11:19:44 +0000 (13:19 +0200)]
thermometer: Store thermometer devices per-adapter

This patch replaces global list of thermometer devices with per-adapter
lists.

11 years agotest: Convert test-device to ObjectManager & D-Bus Properties
Johan Hedberg [Tue, 9 Oct 2012 10:45:41 +0000 (12:45 +0200)]
test: Convert test-device to ObjectManager & D-Bus Properties

11 years agotest: Convert test-adapter to ObjectManager & D-Bus Properties
Johan Hedberg [Tue, 9 Oct 2012 10:27:29 +0000 (12:27 +0200)]
test: Convert test-adapter to ObjectManager & D-Bus Properties

11 years agotest: Update list-devices to ObjectManager
Johan Hedberg [Tue, 9 Oct 2012 10:03:03 +0000 (12:03 +0200)]
test: Update list-devices to ObjectManager

11 years agoadapter: Emit signals through DBus.Properties
Lucas De Marchi [Tue, 9 Oct 2012 07:59:56 +0000 (04:59 -0300)]
adapter: Emit signals through DBus.Properties

11 years agoadapter: Port remaining properties to DBus.Properties
Lucas De Marchi [Tue, 9 Oct 2012 07:59:55 +0000 (04:59 -0300)]
adapter: Port remaining properties to DBus.Properties

Remaining properties ported to DBus.Properties:
- Pairable
- Discoverable
- Powered

11 years agoadapter: Fix calling mgmt_set_pairable() with error set
Lucas De Marchi [Tue, 9 Oct 2012 07:59:54 +0000 (04:59 -0300)]
adapter: Fix calling mgmt_set_pairable() with error set

11 years agoadapter: Add session type to session_req
Lucas De Marchi [Tue, 9 Oct 2012 07:59:53 +0000 (04:59 -0300)]
adapter: Add session type to session_req

With this field we can differentiate requests that should have global
actions from the ones created with RequestSession(). The intention with
this is to allow to separate how we detect a global request on
set_mode_complete(), not tying to the name of the D-Bus method it came
from.

11 years agoadapter: Refactor set_mode() in 2 functions
Lucas De Marchi [Tue, 9 Oct 2012 07:59:52 +0000 (04:59 -0300)]
adapter: Refactor set_mode() in 2 functions

Separate the handling of pending_mode from setting mode. This way it's
simpler to set the pending_mode only when needed. Half of callers were
passing NULL to this parameter.

11 years agoadapter: Set *Timeout through DBus.Properties
Lucas De Marchi [Tue, 9 Oct 2012 07:59:51 +0000 (04:59 -0300)]
adapter: Set *Timeout through DBus.Properties

11 years agoadapter: Set Name through DBus.Properties
Lucas De Marchi [Tue, 9 Oct 2012 07:59:50 +0000 (04:59 -0300)]
adapter: Set Name through DBus.Properties

11 years agoadapter: Add DBus.Properties getters
Lucas De Marchi [Tue, 9 Oct 2012 07:59:49 +0000 (04:59 -0300)]
adapter: Add DBus.Properties getters

11 years agoattrib: Remove opcode parameter from g_attrib_send()
Vinicius Costa Gomes [Tue, 9 Oct 2012 00:17:38 +0000 (21:17 -0300)]
attrib: Remove opcode parameter from g_attrib_send()

In all uses of g_attrib_send() the opcode of the command/event is
already clear because of the att.h functions used to build the ATT
PDU.

11 years agocore: Add support for included services
Vinicius Costa Gomes [Tue, 9 Oct 2012 00:17:37 +0000 (21:17 -0300)]
core: Add support for included services

Soon after the primary service discovery is complete, we do a included
services discovery for all found services and add each included service
to the 'services' list so they can be probe()'d as a normal profile.

This will also make these services to appear on the D-Bus object tree.

11 years agogatttool: Add "included" command
Jefferson Delfes [Tue, 9 Oct 2012 00:17:36 +0000 (21:17 -0300)]
gatttool: Add "included" command

New command to find included services in interactive mode.

11 years agogatt: Add support for find included services
Vinicius Costa Gomes [Tue, 9 Oct 2012 00:17:35 +0000 (21:17 -0300)]
gatt: Add support for find included services

Some services like HID over LE can reference another service using
included services.

See Vol 3, Part G, section 2.6.3 of Core specification for more
details.

11 years agoservice: Fix passing stack variable as reference value
Luiz Augusto von Dentz [Mon, 8 Oct 2012 20:08:24 +0000 (22:08 +0200)]
service: Fix passing stack variable as reference value

BDADDR_ANY cannot be return as it uses stack allocation:

Conditional jump or move depends on uninitialised value(s)
   at 0x170E47: sdp_record_remove (sdpd-database.c:269)
   by 0x17071A: remove_record_from_server (sdpd-service.c:290)
   by 0x14D416: exit_callback (service.c:131)
   by 0x124396: service_filter (watch.c:486)
   by 0x12405A: message_filter (watch.c:554)
   by 0x4F63A35: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.5.6)
   by 0x122EE7: message_dispatch (mainloop.c:76)
   by 0x4C7B3BA: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
   by 0x4C7A824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
   by 0x4C7AB57: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
   by 0x4C7AF51: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3200.4)
   by 0x1225B1: main (main.c:551)
 Uninitialised value was created by a stack allocation
   at 0x1705B0: add_record_to_server (sdpd-service.c:235)

Conditional jump or move depends on uninitialised value(s)
   at 0x4A0AD21: bcmp (mc_replace_strmem.c:889)
   by 0x4C959E0: g_slist_find_custom (in /usr/lib64/libglib-2.0.so.0.3200.4)
   by 0x17C059: manager_find_adapter (manager.c:291)
   by 0x170E8F: sdp_record_remove (sdpd-database.c:270)
   by 0x17071A: remove_record_from_server (sdpd-service.c:290)
   by 0x14D416: exit_callback (service.c:131)
   by 0x124396: service_filter (watch.c:486)
   by 0x12405A: message_filter (watch.c:554)
   by 0x4F63A35: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.5.6)
   by 0x122EE7: message_dispatch (mainloop.c:76)
   by 0x4C7B3BA: ??? (in /usr/lib64/libglib-2.0.so.0.3200.4)
   by 0x4C7A824: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3200.4)
 Uninitialised value was created by a stack allocation
   at 0x1705B0: add_record_to_server (sdpd-service.c:235)

11 years agoinput: Fix registering HoG service for non-HoG profiles
Vinicius Costa Gomes [Tue, 9 Oct 2012 00:04:34 +0000 (21:04 -0300)]
input: Fix registering HoG service for non-HoG profiles

We need to handle the case that the device has multiple HoG services,
but before registering we must check the service UUID.

11 years agoemulator: Add first draft of b1ee tool
Marcel Holtmann [Mon, 8 Oct 2012 22:35:47 +0000 (00:35 +0200)]
emulator: Add first draft of b1ee tool

11 years agoevent: Remove not used btd_event_remote_class
Szymon Janc [Mon, 8 Oct 2012 12:11:28 +0000 (14:11 +0200)]
event: Remove not used btd_event_remote_class

This was used in hciops only. With mgmt interface remote CoD is
received in EIR from Device Found/Connected events.

11 years agogdbus: Fix processing pending properties in remove_interface()
Johan Hedberg [Mon, 8 Oct 2012 12:36:12 +0000 (14:36 +0200)]
gdbus: Fix processing pending properties in remove_interface()

11 years agocore: Fix GATT security level for non-paired devices
Johan Hedberg [Mon, 8 Oct 2012 10:17:01 +0000 (13:17 +0300)]
core: Fix GATT security level for non-paired devices

If we're not paired we shouldn't use medium security (which requires
pairing).

11 years agodevice: Fix missing iterator append call in dev_property_get_product
Johan Hedberg [Sat, 6 Oct 2012 17:58:30 +0000 (19:58 +0200)]
device: Fix missing iterator append call in  dev_property_get_product

11 years agobuild: Indicate 5.x development branch
Marcel Holtmann [Sat, 6 Oct 2012 16:31:07 +0000 (18:31 +0200)]
build: Indicate 5.x development branch

11 years agocore: Move functions to avoid forward declaration
Lucas De Marchi [Sat, 6 Oct 2012 07:02:40 +0000 (04:02 -0300)]
core: Move functions to avoid forward declaration

11 years agocore: Add setters and signals to Device interface
Lucas De Marchi [Sat, 6 Oct 2012 07:02:39 +0000 (04:02 -0300)]
core: Add setters and signals to Device interface

11 years agocore: Add DBus.Properties getters for Device interface
Lucas De Marchi [Sat, 6 Oct 2012 07:02:38 +0000 (04:02 -0300)]
core: Add DBus.Properties getters for Device interface

11 years agodoc: Mark optional properties in Device interface
Lucas De Marchi [Sat, 6 Oct 2012 07:02:37 +0000 (04:02 -0300)]
doc: Mark optional properties in Device interface

11 years agocore: Remove useless memset and make icon optional
Lucas De Marchi [Sat, 6 Oct 2012 07:02:36 +0000 (04:02 -0300)]
core: Remove useless memset and make icon optional

name is not being really used anywhere, so remove it together with the
memset from Device.GetProperties().

icon is optional, so check if it's not NULL before adding it to the list
of device properties.

11 years agogdbus: Fix up Properties.Set() code path
Lucas De Marchi [Sat, 6 Oct 2012 07:02:35 +0000 (04:02 -0300)]
gdbus: Fix up Properties.Set() code path

Minor fixes to make setter actually work:

- Add propdata in pending_property_set
- Break loop when we are removing propdata from list and we
  found it
- in_args and out_args were swapped
- interface and method name arguments were swapped

11 years agogdbus: Fix invalid memory access while unregistering
Lucas De Marchi [Thu, 4 Oct 2012 20:42:33 +0000 (17:42 -0300)]
gdbus: Fix invalid memory access while unregistering

If an interface is added and removed on the same mailoop iteration,
ObjectManager would try to send InterfacesAdded signal while running the
idler because the interface was added to data->added list.

This is easily reproduced by forcing an error path in a plugin
registration, like on sap_server_register(), resulting in the following
error:

==11795== Invalid read of size 4
==11795==    at 0x496F592: dbus_message_iter_append_basic (dbus-message.c:2598)
==11795==    by 0x117B39: append_interface (object.c:554)
==11795==    by 0x48955E7: g_slist_foreach (gslist.c:840)
==11795==    by 0x11923B: process_changes (object.c:592)
==11795==    by 0x11956D: generic_unregister (object.c:980)
==11795==    by 0x4973BAC: _dbus_object_tree_unregister_and_unlock (dbus-object-tree.c:516)
==11795==    by 0x4965240: dbus_connection_unregister_object_path (dbus-connection.c:5776)
==11795==    by 0x1178A5: object_path_unref (object.c:1219)
==11795==    by 0x118517: g_dbus_unregister_interface (object.c:1344)
==11795==    by 0x19AF5B: sap_exit (sap.c:385)
==11795==    by 0x13E9E2: sap_server_register (server.c:1428)
==11795==    by 0x13C092: sap_server_probe (manager.c:44)

With this patch we don't send the InterfacesAdded signal, removing it
from data->added while unregistering.

11 years agodoc: Cycling Speed and Cadence profile (CSCP) API
Andrzej Kaczmarek [Mon, 1 Oct 2012 09:43:41 +0000 (11:43 +0200)]
doc: Cycling Speed and Cadence profile (CSCP) API

11 years agoAUTHORS: Add missing people
Johan Hedberg [Fri, 5 Oct 2012 17:15:05 +0000 (19:15 +0200)]
AUTHORS: Add missing people

11 years agodevice: Move auth_type_t definition to device.c
Szymon Janc [Fri, 5 Oct 2012 12:54:39 +0000 (14:54 +0200)]
device: Move auth_type_t definition to device.c

Bonding is handled in device.c and auth_type_t is private device data
not used outside of it.

11 years agoadapter: Don't use adapter_get_path to access adapter path
Szymon Janc [Fri, 5 Oct 2012 12:54:38 +0000 (14:54 +0200)]
adapter: Don't use adapter_get_path to access adapter path

Use struct btd_adapter directly to access path member.

11 years agoadapter: Don't use adapter_get_address to access adapter address
Szymon Janc [Fri, 5 Oct 2012 12:54:37 +0000 (14:54 +0200)]
adapter: Don't use adapter_get_address to access adapter address

Use struct btd_adapter directly to access bdaddr member.

11 years agodevice: Don't use device_get_addr_type to access device address type
Szymon Janc [Fri, 5 Oct 2012 12:54:36 +0000 (14:54 +0200)]
device: Don't use device_get_addr_type to access device address type

Use struct btd_device directly to access bdaddr_type member.

11 years agodevice: Don't use device_get_adapter to access device adapter
Szymon Janc [Fri, 5 Oct 2012 12:54:35 +0000 (14:54 +0200)]
device: Don't use device_get_adapter to access device adapter

Use struct btd_device directly to access adapter member.

11 years agodevice: Remove bogus line from device_create_bonding
Szymon Janc [Fri, 5 Oct 2012 11:08:37 +0000 (13:08 +0200)]
device: Remove bogus line from device_create_bonding

This is a typo from 899e6561d284806007b7e57e1ab3b65e54be3d22.

11 years agodevice: Make device_get_address return const pointer
Szymon Janc [Fri, 5 Oct 2012 08:17:01 +0000 (10:17 +0200)]
device: Make device_get_address return const pointer

11 years agoadapter: Constify use of bdaddr_t pointer parameters
Szymon Janc [Fri, 5 Oct 2012 08:17:00 +0000 (10:17 +0200)]
adapter: Constify use of bdaddr_t pointer parameters

Mark all input only bdaddr_t pointer parameters as const.

11 years agomgmt: Constify use of bdaddr_t pointer parameters
Szymon Janc [Fri, 5 Oct 2012 08:16:59 +0000 (10:16 +0200)]
mgmt: Constify use of bdaddr_t pointer parameters

Mark all input only bdaddr_t pointer parameters as const.

11 years agodevice: Convert device_get_address into simple getter
Szymon Janc [Fri, 5 Oct 2012 08:16:58 +0000 (10:16 +0200)]
device: Convert device_get_address into simple getter

This allow to remove number of local variables used only to get device
address and pass it as pointer later on.

bdaddr_type parameter is also removed as there is device_get_addr_type
already present which can be used to get it if needed.