Commit Graph

9198 Commits

Author SHA1 Message Date
Anderson Lizardo
5297e0c3b0 audio: Fix errno handling convention
Variables which are assigned to the errno variable (usually called
"err") should be negative, and "-err" should be used where a positive
value is needed.
2011-11-17 13:57:52 +02:00
Anderson Lizardo
13de1a7a5b audio/PCM: Fix errno handling convention
Variables which are assigned to the errno variable (usually called
"err") should be negative, and "-err" should be used where a positive
value is needed.
2011-11-17 13:57:52 +02:00
Anderson Lizardo
5c6db9e861 audio/IPC: Fix errno handling convention
Variables which are assigned to the errno variable (usually called
"err") should be negative, and "-err" should be used where a positive
value is needed.

This commit also changes places where errno can be replaced with -err
(for consistency) and one perror() usage error.
2011-11-17 13:57:52 +02:00
Anderson Lizardo
f2c10b575c AVDTP: Fix errno handling convention
Variables which are assigned to the errno variable (usually called
"err") should be negative, and "-err" should be used where a positive
value is needed.
2011-11-17 13:57:52 +02:00
Anderson Lizardo
e4e02ce657 AVCTP: Fix errno handling convention
Variables which are assigned to the errno variable (usually called
"err") should be negative, and "-err" should be used where a positive
value is needed.

This patch also fixes a bug related to not using an "err" variable to
store the errno value before calling external library code.
2011-11-17 13:57:52 +02:00
Luiz Augusto von Dentz
c1f8969f83 rctest: fix not setting priority of accepted socket
SO_PRIORITY is not inherited upon accept so it has to be set manually in
the new socket.
2011-11-16 15:28:23 +02:00
Luiz Augusto von Dentz
62173e1850 l2test: fix not setting priority of accepted socket
SO_PRIORITY is not inherited upon accept so it has to be set manually in
the new socket.
2011-11-16 15:28:15 +02:00
Anderson Lizardo
474c85f7a6 Time Profile: add Local Time Information characteristic
This is an optional characteristic from the Current Time Service. From
the spec:

"The Local Time Information characteristic returns the local time
information that includes time zone and DST offset when read using the
GATT Read Characteristic Value sub-procedure."
2011-11-14 21:14:21 +02:00
Anderson Lizardo
d1e8012cc6 Time Profile: add Current Time Service
Add support for the Current Time Service (CTS). From the spec:

"This service defines how the current time can be exposed using the
Generic Attribute Profile (GATT)."
2011-11-14 21:14:07 +02:00
Anderson Lizardo
f4d4dd6d41 Migrate example service to high level GATT API
This commit migrates the dummy "Battery Service" from example GATT
plugin to demonstrate how the new API is used.
2011-11-14 21:09:50 +02:00
Vinicius Costa Gomes
fffffad4b8 Add support for getting the handle of the CCC attribute 2011-11-14 21:09:36 +02:00
Anderson Lizardo
cdb0f1e52a Add GATT_OPT_CHR_VALUE_GET_HANDLE to gatt_service_add()
This new parameter accepts a pointer to a variable where the attribute
handle for the characteristic value is stored.
2011-11-14 21:09:22 +02:00
Anderson Lizardo
67cd2b0922 Implement high level GATT API for service registration
This new internal API can be used for implementing GATT services (server
role). It is built around the current attribute API (attrib_db_add() and
others).
2011-11-14 21:08:23 +02:00
Claudio Takahasi
ac5178859b Fix removing storage for device over BR/EDR
"characteristic", "attributes" and "ccc" files will be shared by both
transports: LE and BR/EDR. Remove the entry from the "primary" file
should be the last operation to clean the storage properly if the
device operation mode is GATT/ATT over BR/EDR.
2011-11-14 20:51:48 +02:00
Claudio Takahasi
a6cabbf64b Remove CCC if the device is not bonded
Changes attrib server to remove CCC entries of the device when the
connection is established if the device is not bonded.
2011-11-14 20:51:27 +02:00
Claudio Takahasi
2abb3498e8 Add storage function to remove CCC of a device 2011-11-14 20:50:58 +02:00
Claudio Takahasi
13fc666eaa Add generic function to delete by pattern
Remove entries of textfile if the key has the prefix defined by the
pattern string.
2011-11-14 20:48:41 +02:00
Claudio Takahasi
a9e207e5a1 Remove CCC entries when device is removed 2011-11-14 20:48:12 +02:00
Claudio Takahasi
2878b49b8a Remove notification and indication from server
Upper layer should handle notification and indication since there are
profiles especific constraints including timeouts and attributes values
that should read only before sending it.
2011-11-14 20:48:02 +02:00
Claudio Takahasi
31247e9a68 Add CCC persistence in attrib server
This patch adds storage of the Client Characteristic Configuration
attribute value. CCC is readable with no authentication/authorization.
Writable with authentication and authorization defined by a higher layer
specification or implementation specific.
2011-11-14 20:47:06 +02:00
Claudio Takahasi
8cfdf96ac5 Remove CCC for read by type
Read by type is never used to iterate through attributes related to
Client Characteristic Configuration or any other descriptor.
2011-11-14 20:46:55 +02:00
Claudio Takahasi
8790d20b0b Remove CCC for read by group
Read by group is used to discover all primary services. Client
Characteristic Configuration is not applied to service definition.
2011-11-14 20:46:34 +02:00
Vinicius Costa Gomes
f2ec605b58 Add storage functions to deal with CCC
CCC (Client Characteristic Configuration) is used to allow configuration
whether to send updates about an characteristic value.
2011-11-14 20:45:34 +02:00
Dmitriy Paliy
a267bc2dcd Fix enable fast connectable when connection allowed 2011-11-14 14:09:00 +02:00
Vinicius Costa Gomes
97bbdeee7f Fix simple-player test script to make it work with dbus-python-0.84 2011-11-14 12:56:28 +02:00
Marcel Holtmann
03361ee983 build: Use target specific CFLAGS and inherit AM_CFLAGS 2011-11-13 13:48:44 +09:00
Marcel Holtmann
8f47678344 build: Create src/builtin.h via BUILT_SOURCES 2011-11-13 08:25:35 +09:00
Johan Hedberg
06d70d1c77 btmgmt: Add keys command
This command calls the load_link_keys mgmt method and can also be used
for load_long_term_keys in the future. Right now it always sends an
empty list but is still useful for activating the HCI_LINKKEYS flag in
the kernel so that the kernel keeps track of link keys.
2011-11-11 16:14:35 +02:00
Johan Hedberg
d6556d05a2 btmgmt: Add mgmt status to string conversion function 2011-11-11 15:54:31 +02:00
Johan Hedberg
f2091098df btmgmt: Add more convenient address type string function 2011-11-11 00:21:46 +02:00
Johan Hedberg
0573fc7cb1 mgmt: Add address type to mgmt_pair_device
This is important especially in the future when dual-mode devices can be
connected to over LE. It's also important if/when we decide to move the
advertisement cache into user-space.
2011-11-11 00:04:10 +02:00
Johan Hedberg
4ba0653414 btmgmt: Fix compilation issues with hci_set_bit
This fixes string-aliasing rules warnings/errors with certain compilers.
2011-11-10 17:26:46 +02:00
Johan Hedberg
39609deec7 btmgmt: Add support for specifying IO capability when pairing 2011-11-10 15:52:27 +02:00
Johan Hedberg
70e2eb281f btmgmt: Add basic user confirm support 2011-11-10 15:45:15 +02:00
Johan Hedberg
56e618fa5b btmgmt: Add basic PIN Code request support 2011-11-10 15:22:50 +02:00
Johan Hedberg
74b43ba833 mgmt: Add status parameter to disconnect response 2011-11-10 14:17:24 +02:00
Johan Hedberg
826baf65cb btmgmt: Add basic remove command 2011-11-10 14:04:52 +02:00
Johan Hedberg
60bb8e3586 mgmt: Add bdaddr and status to remove_keys response 2011-11-10 14:04:40 +02:00
Johan Hedberg
c9c244d485 btmgmt: Add basic pair command 2011-11-10 14:03:10 +02:00
Johan Hedberg
60f1ace558 btmgmt: Make use of struct mgmt_cp_start_discovery 2011-11-10 10:52:42 +02:00
Johan Hedberg
86c731b39b mgmtops: Update start_discovery parameters to latest spec 2011-11-10 10:51:03 +02:00
Johan Hedberg
f89f6b68b8 Add struct for start_discovery to mgmt.h 2011-11-10 10:50:44 +02:00
Johan Hedberg
e1c4b57e0d btmgmt: Fix start_discovery parameters to match latest spec 2011-11-10 10:45:11 +02:00
Lukasz Rymanowski
caf3276437 SAP: Fix handling ongoing call in sap-dummy
There is no need to send sap_connect_rsp when "call" is ended. Status
Indication is enough.

Also we should provide max supported msg size in the connect response
having status: OK_ONGOING_CALL.
2011-11-10 10:27:18 +02:00
Lukasz Rymanowski
519ff20d9e SAP: Fix handling ongoing call
If device is in ongoing call SAP server shall response on connect with
connection status 0x04 and once call is ended shall send reset status
indication.

With this patch, when reset status indication comes from backend and SAP
server is in connection in progreess state, SAP server changes state to
connected.
2011-11-10 10:24:46 +02:00
Lukasz Rymanowski
2d6ca05225 SAP: Fix for connect response
Max Message size shall be added to connect response when
ConnectionStatus is SAP_STATUS_OK_ONGOING_CALL. Let's always attach
maxmsgsize to the connect response if it is provided by the backend.
2011-11-10 10:24:29 +02:00
Lukasz Rymanowski
a5c10fdea5 SAP: Add support for handle ongoing call
With this patch support for handling connect request during ongoing call
is added.
2011-11-10 10:24:13 +02:00
Johan Hedberg
54e4ac2d6a btmgmt: Fix missing : in switch statement 2011-11-09 15:55:12 +02:00
Johan Hedberg
f062b128db mgmt: Add LE public/random info to address types 2011-11-09 13:52:05 +02:00
Johan Hedberg
4c63c025a5 mgmt: Update BR/EDR link key message naming to match new API 2011-11-07 20:09:03 +02:00