| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Since this built in profile only handles the GAP service, this patch
renames it to gap.
|
|
|
|
|
|
| |
ATT MTU exchange and handling of indications from the "Service Changed"
characteristic are now handled by shared/gatt-client, so this profile
should only deal with the GAP service.
|
|
|
|
| |
As described in coding style M10.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
session will be NULL if A2DP connection fails because of NO REPLY
from endpoint or if the configuration is aborted. Accessing session
device in such a scenario leads to bluetoothd crash.
(gdb) bt full
0 avdtp_get_device (session=0x0) at profiles/audio/avdtp.c:3987
No locals.
1 0xb6f0e352 in auto_config (data=<value optimized out>)
at profiles/audio/a2dp.c:382
setup = 0xb7a4f230
dev = <value optimized out>
2 0xb6f132f6 in config_cb (endpoint=<value optimized out>,
ret=<value optimized out>, size=<value optimized out>,
user_data=<value optimized out>) at profiles/audio/media.c:534
data = <value optimized out>
3 0xb6f1398a in media_endpoint_cancel (endpoint=0xb7a43e78)
at profiles/audio/media.c:136
endpoint = 0xb7a43e78
4 media_endpoint_cancel_all (endpoint=0xb7a43e78)
at profiles/audio/media.c:144
No locals.
5 0xb6f13e04 in clear_endpoint (endpoint=0xb7a43e78)
at profiles/audio/media.c:245
No locals.
6 0xb6f13f68 in endpoint_reply (call=<value optimized out>,
user_data=0xb7a4e538) at profiles/audio/media.c:275
request = 0xb7a4e538
endpoint = 0xb7a43e78
reply = 0xb7a3f560
err = {name = 0xb7a5de70 "org.freedesktop.DBus.Error.NoReply"
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When UHID_SET_REPORT is received, hog has to send the given value
of the report to the device and send back the error code to the caller.
This function has to be synchronous, so the answer is sent in
set_report_cb().
(David: Track reports and cancel them on timeouts. Also fix some
"get"->"set" typos.)
|
|
|
|
|
|
|
|
|
|
|
|
| |
When UHID_GET_REPORT is received, hog has to update the current value
of the report and send it back to the caller.
This function should be synchronous, so the answer is sent in
get_report_cb().
(David: Track reports and cancel them on uhid timeouts. Otherwise, we'd
incorrectly match reponses. Also fix "feature"->"get" typos and
handle reports without IDs)
|
|
|
|
|
|
| |
HoG currently only implements UHID_OUTPUT. We need to also implement
UHID_GET_REPORT and UHID_SET_REPORT. Break out the report retrieval
to use this function in the two missing implementation.
|
|
|
|
|
| |
Kernel 3.18 ships a new API for uhid devices. This API is retro-compatible
so we can keep the current symbols.
|
|
|
|
|
| |
In case the remote has initiate a connection already the code should
return -EBUSY to avoid possible command collisions on AVDTP session.
|
|
|
|
|
|
|
| |
Some bluetooth headset (BOSE) initates the avdtp connection immediately
after HFP connection is completed, so if application initates a2dp
connection and since already avdtp connection is ongoing should return
error EBUSY.
|
| |
|
|
|
|
| |
Indentions should be tabbed to keep consist with other structs.
|
|
|
|
|
| |
Make code consistent with the rest returning -errno and printing error
message.
|
| |
|
| |
|
| |
|
|
|
|
| |
Avoid errno be overwritten and make code consistent.
|
| |
|
|
|
|
|
| |
Fixes bnep_if_up() usage since it already prints error message and
returns errno.
|
|
|
|
|
| |
Some functions are using bnep_if_up() like bnep_server_add() referring
directly to errno which may be overwritten already.
|
|
|
|
| |
Add "bnep" before error message.
|
|
|
|
|
| |
This avoids double printing the same error with bnep connection add
ioctl.
|
| |
|
|
|
|
|
| |
Now profiles/health/ , android/health and mcaptest will use
profiles/health/mcap-lib.
|
|
|
|
|
|
|
|
|
|
|
|
| |
tid holds glib source id and should be of guint type.
This fix following compilation error with musl:
CC profiles/health/bluetoothd-hdp.o
profiles/health/hdp.c:84:2: error: unknown type name 'uint'
uint tid; /* echo timeout */
^
Please enter the commit message for your changes. Lines starting
|
|
|
|
|
|
|
|
|
|
|
|
| |
CC profiles/alert/bluetoothd-server.o
In file included from profiles/alert/server.c:49:0:
./src/textfile.h:24:1: error: unknown type name 'mode_t'
int create_file(const char *filename, const mode_t mode);
^
Makefile:7469: recipe for target 'profiles/alert/bluetoothd-server.o'
failed
make[1]: *** [profiles/alert/bluetoothd-server.o] Error 1
Makefile:3072: recipe for target 'all' failed
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix multiple errors similar to:
profiles/sap/sap-u8500.c: In function 'send_request':
profiles/sap/sap-u8500.c:288:3: error: implicit declaration of
function 'strerror' [-Werror=implicit-function-declaration]
sap_error("sending request failed: %s", strerror(ENOMEM));
^
profiles/sap/sap-u8500.c:288:3: error: format '%s' expects argument
of type 'char *', but argument 2 has type 'int' [-Werror=format=]
profiles/sap/sap-u8500.c:297:3: error: implicit declaration of function
'memcpy' [-Werror=implicit-function-declaration]
memcpy(msg->payload, param->val, param->len);
^
|
|
|
|
|
|
| |
According to the spec GetCapabilities is mandatory for both TG and CT but
some devices reject it anyway which can lead to a crash if not handled
properly.
|
|
|
|
|
|
|
|
|
|
| |
If the AVDTP session is terminated via any other mean than
'connection_lost()' (the only place that btd_device_unref() was called),
there was a dangling reference to the device.
This can be easily reproduced by suspending the host while using an A2DP
speaker. It has the very misleading effect of being unable to create the
device when the system resumes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uHID device is created only once so it is possible that the kernel send
events when there is no connection causing the following crash:
Invalid read of size 4
at 0x4EBC650: g_io_channel_unix_get_fd (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x42C56A: hidp_send_message (device.c:160)
by 0x46EF1C: queue_foreach (queue.c:206)
by 0x42E3B0: uhid_read_handler (uhid.c:98)
by 0x46E82C: read_callback (io-glib.c:168)
by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
by 0x40A972: main (main.c:607)
Address 0x70 is not stack'd, malloc'd or (recently) free'd
|
|
|
|
| |
First remove object from the list and then remove it.
|
| |
|
| |
|
|
|
|
|
|
| |
When number of items is unknown the code will attempt to use the maximum
possible end offset but this cause an overflow since index 0 is also
valid the total of items will overflow a uint32_t.
|
|
|
|
|
|
|
| |
Instead of mapping all UHID_OUTPUT events blindly to the first hid output
report found, we now map it to the correct attribute. We use the rtype and
report-id information in each UHID_OUTPUT message and map it according to
the mapping-characteristics provided by the device.
|
|
|
|
|
| |
These interfaces have been stable for a while so there is no reason to
keep them as experimental anymore.
|
|
|
|
| |
The first valid index is 0 not 1.
|
|
|
|
|
| |
The total number of items should account that the start and end index are
included so end - start index is incorrect.
|
|
|
|
|
| |
The callback register by bt_uhid_register already contains the event type
so there is no need to check for it again.
|
|
|
|
|
|
| |
The forward_report function currently assumes that all events it gets
are of UHID_OUTPUT type. Simply remove trying to use it for anything
else until we have a proper patch for UHID_FEATURE handling.
|
|
|
|
|
|
| |
PATH_MAX already contains the terminating null so there's no need to +1
to it. Also, snprintf guarantees a null-terminated string so there's no
need to explicitly set a terminating character after the call.
|
| |
|
| |
|
| |
|
|
|
|
| |
Improves readability of the code using similar check for not NULL.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Function sdp_set_add_access_protos() always returns 0, so there is no
sense to check for error code.
|