Commit Graph

9184 Commits

Author SHA1 Message Date
Santiago Carot-Nemesio
fc807dd254 Provide return status in gatt_service_add function
Service plugins using the new GATT API may need to know if their
attributes were successfully registered. In this way, plugins might
abort loading operation if they weren't registered.
2011-12-02 13:28:29 +02:00
Syam Sidhardhan
18cf514fcd Remove unneeded GError assignment to NULL 2011-12-02 13:15:37 +02:00
Santiago Carot-Nemesio
035c0bc524 btio: Fix byte order conversion when getting L2CAP PSM
The L2CAP PSM is passed and received in little endian byte order through
the socket interface so a conversion is in place before passing it
onwards.
2011-11-30 23:25:31 +02:00
Marcel Holtmann
b9ab5a45ff hciemu: Just use local port numbers only 2011-11-30 18:35:57 +01:00
Marcel Holtmann
bc3feb5e77 hciemu: Use epoll() instead of GLib mainloop 2011-11-30 17:51:13 +01:00
Marcel Holtmann
1392f728c8 hciemu: Remove support for running a proxy 2011-11-30 17:01:02 +01:00
Jorge Fernandez Gonzalez
9d183bfbaf Add missing health test scripts to Makefile.tools 2011-11-25 14:27:15 +02:00
Timo Gienger
8d523a075b Fix reading of on_mode in btd_adapter_get_mode
If InitiallyPowered was set to false, it was not possible to use
hciconfig tool, as on_mode variable was set to MODE_OFF making it
impossible to enable BT via hciconfig until a D-Bus call was done and the
variable was set in config file as connectable.

Additionally the patch removes the if-else condition, as the both calls
done exactly the same. Removed also last else condition as MODE_OFF
should not be valid for on_mode. Fix tested with hciops interface.
2011-11-23 16:10:36 +02:00
Santiago Carot-Nemesio
2776a390de Add thermometer python test script 2011-11-22 14:29:22 +02:00
Mikel Astiz
053a3f62f9 media: update copyright statement 2011-11-21 12:57:59 +02:00
Mikel Astiz
8403408cd2 a2dp: update copyright statement 2011-11-21 12:57:56 +02:00
Mikel Astiz
fbcaf3f77a a2dp: avoid conversion between guint and pointers
These conversions might cause a segmentation fault in 64 bit machines.
2011-11-21 12:49:06 +02:00
Mikel Astiz
bfdcd55901 media: sep registration fix 2011-11-21 12:49:03 +02:00
Mikel Astiz
ea0d9aef03 media: release transport locks on acquisition failure 2011-11-21 12:48:58 +02:00
Luiz Augusto von Dentz
6b1be64e10 audio: enable Media API by default
This replaces unix socket IPC which is considered deprecated and will
eventually be removed.
2011-11-21 11:50:16 +02:00
Anderson Lizardo
7f54269acc serial: Fix error handling in connect_port()
bt_io_connect() does not set errno on error, instead it uses GError. For
now, simply return -EIO if bt_io_connect() fails. The serial plug-in
code can be changed later to use and set GError appropriately.
2011-11-18 17:37:02 +02:00
Anderson Lizardo
5e9048c878 AVDTP: Fix closing invalid FD on error
In gst_avdtp_sink_start(), if bt_audio_service_open() failed, there was
an attempt to close an invalid file descriptor (through
bt_audio_service_close()).
2011-11-18 13:24:22 +02:00
Santiago Carot-Nemesio
5735830b25 Notify intermediate measurements 2011-11-18 13:14:29 +02:00
Santiago Carot-Nemesio
a6c34b2c3a Implement DisableIntermediateMeasurement D-Bus method 2011-11-18 13:14:27 +02:00
Santiago Carot-Nemesio
02308bf820 Implement EnableIntermediateMeasurement D-Bus method 2011-11-18 13:14:24 +02:00
Santiago Carot-Nemesio
09eeaa22fc Add org.bluez.ThermometerWatcher interface to default policy 2011-11-18 13:14:21 +02:00
Santiago Carot-Nemesio
e414184082 Parse final measurement indication 2011-11-18 13:14:19 +02:00
Santiago Carot-Nemesio
1b34ecad4f Manage GATT attribute indications in handle callback 2011-11-18 13:14:12 +02:00
Santiago Carot-Nemesio
9c535867ec Fix coding style issue regarding with pointer checks 2011-11-17 13:59:01 +02:00
Anderson Lizardo
5bd311398e Fix return value check for bt_audio_service_open()
Only negative values (namely -1) are errors for this function.
2011-11-17 13:57:53 +02:00
Anderson Lizardo
e40bc80bf5 csr_bcsp: Fix missing errno attribution
do_command() is supposed to set errno if returning -1.
2011-11-17 13:57:53 +02:00
Anderson Lizardo
7232da34fa bccmd: Fix overwriting errno value
On error, transport_read() returns -1 and sets errno.
2011-11-17 13:57:53 +02:00
Anderson Lizardo
467fcb8094 btio: 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:53 +02:00
Anderson Lizardo
fb84461539 input: 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.

Also remove a few unnecessary errno assignments.
2011-11-17 13:57:53 +02:00
Anderson Lizardo
4879b9d75c network: 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:53 +02:00
Anderson Lizardo
18f92a51a2 sap-u8500: 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:53 +02:00
Anderson Lizardo
5a1fd2f1a8 sdp-client: 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:53 +02:00
Anderson Lizardo
1d5d9cc826 textfile: 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:53 +02:00
Anderson Lizardo
382c867b09 hciconfig: 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:53 +02:00
Anderson Lizardo
100527bd5a hcitool: 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:53 +02:00
Anderson Lizardo
7f7d66842b serial: 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:53 +02:00
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