summaryrefslogtreecommitdiff
path: root/profiles
Commit message (Collapse)AuthorAgeFilesLines
* profiles/gatt: Rename profile to gapArman Uguray2014-12-191-20/+17
| | | | | Since this built in profile only handles the GAP service, this patch renames it to gap.
* profiles/gatt: Don't handle GATT serviceArman Uguray2014-12-191-246/+5
| | | | | | 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.
* profiles: List all enum values in switchSzymon Janc2014-12-085-0/+17
| | | | As described in coding style M10.
* audio/a2dp: Fix Access session device only when its validSagar Nageshmurthy2014-11-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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"
* hog: Fix unnecessary < 0 check of unsigned valueJohan Hedberg2014-11-261-1/+1
|
* hog: implement set_report functionalityBenjamin Tissoires2014-11-261-0/+76
| | | | | | | | | | | 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.)
* hog: implement get_report functionalityBenjamin Tissoires2014-11-261-0/+86
| | | | | | | | | | | | 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: break out the report retrieval in its own functionBenjamin Tissoires2014-11-261-17/+25
| | | | | | 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.
* hog: import latest uhid.h definitionBenjamin Tissoires2014-11-261-12/+105
| | | | | Kernel 3.18 ships a new API for uhid devices. This API is retro-compatible so we can keep the current symbols.
* audio/source: Fix XCASE connectionLuiz Augusto von Dentz2014-11-241-0/+3
| | | | | In case the remote has initiate a connection already the code should return -EBUSY to avoid possible command collisions on AVDTP session.
* audio/sink: Fix a2dp XCASE connectionChethan T N2014-11-201-0/+3
| | | | | | | 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.
* profiles/input: Add Sony Navigation ControllerAlex Gal2014-11-071-0/+4
|
* health: Keep struct element indentions consistGrzegorz Kolodziejczyk2014-11-021-6/+6
| | | | Indentions should be tabbed to keep consist with other structs.
* bnep: Return errno instead of -1 and print errorAndrei Emeltchenko2014-10-231-8/+8
| | | | | Make code consistent with the rest returning -errno and printing error message.
* bnep: trivial: code cleanupAndrei Emeltchenko2014-10-231-5/+4
|
* bnep: Add error print and return errno instead of -1Andrei Emeltchenko2014-10-231-8/+7
|
* bnep: Fix treating return of bnep_if_up as boolLuiz Augusto von Dentz2014-10-201-1/+1
|
* bnep: Fix bnep_add_to_bridge() errno usageAndrei Emeltchenko2014-10-201-12/+11
| | | | Avoid errno be overwritten and make code consistent.
* bnep: Fix incorrect ioctl() checkAndrei Emeltchenko2014-10-201-1/+1
|
* bnep: Fix incorrect use of errnoAndrei Emeltchenko2014-10-201-8/+1
| | | | | Fixes bnep_if_up() usage since it already prints error message and returns errno.
* bnep: Refactor bnep_if_up() returning -errnoAndrei Emeltchenko2014-10-201-8/+7
| | | | | Some functions are using bnep_if_up() like bnep_server_add() referring directly to errno which may be overwritten already.
* bnep: Make error logging more descriptiveAndrei Emeltchenko2014-10-201-18/+18
| | | | Add "bnep" before error message.
* bnep: Avoid double error print for bnep_connadd()Andrei Emeltchenko2014-10-201-8/+6
| | | | | This avoids double printing the same error with bnep connection add ioctl.
* mcap: Rename mcap-lib to mcapRavi kumar Veeramally2014-10-024-3/+3
|
* mcap: Unify libmcap usage for Android and non-Android versionsRavi kumar Veeramally2014-10-028-1567/+1457
| | | | | Now profiles/health/ , android/health and mcaptest will use profiles/health/mcap-lib.
* health: Use proper type for tidSzymon Janc2014-09-241-1/+1
| | | | | | | | | | | | 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
* alert: Fix compilation error with muslSzymon Janc2014-09-241-0/+3
| | | | | | | | | | | | 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
* sap: Fix compilation errors with muslSzymon Janc2014-09-241-0/+1
| | | | | | | | | | | | | | | | 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); ^
* audio/avrcp: Fix not handling errors for GetCapabilitiesLuiz Augusto von Dentz2014-09-031-1/+2
| | | | | | 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.
* audio/avdtp: Fix invalid reference countingVinicius Costa Gomes2014-08-211-1/+1
| | | | | | | | | | 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.
* input: Fix crash when receiving event from uHIDLuiz Augusto von Dentz2014-08-201-0/+5
| | | | | | | | | | | | | | | | | 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
* proximity: Fix use after freeAndrei Emeltchenko2014-08-111-2/+2
| | | | First remove object from the list and then remove it.
* input/hog: Remove unnecessary variablesLuiz Augusto von Dentz2014-08-081-10/+7
|
* audio/player: Reduce verbosityLuiz Augusto von Dentz2014-08-061-24/+0
|
* audio/avrcp: Fix overflow when using UINT32_MAXLuiz Augusto von Dentz2014-08-061-3/+9
| | | | | | 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.
* hog: fix output-report to attr mappingDavid Herrmann2014-08-051-19/+36
| | | | | | | 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.
* audio/media: Remove experimental status from Media* interfacesLuiz Augusto von Dentz2014-08-052-58/+34
| | | | | These interfaces have been stable for a while so there is no reason to keep them as experimental anymore.
* audio/avrcp: Fix not continuing from the correct indexLuiz Augusto von Dentz2014-07-311-1/+1
| | | | The first valid index is 0 not 1.
* audio/avrcp: Fix not accounting all items when listingLuiz Augusto von Dentz2014-07-311-1/+1
| | | | | The total number of items should account that the start and end index are included so end - start index is incorrect.
* input/hog: Cleanup unnecessary codeLuiz Augusto von Dentz2014-07-291-3/+0
| | | | | The callback register by bt_uhid_register already contains the event type so there is no need to check for it again.
* input: Remove broken UHID_FEATURE supportJohan Hedberg2014-07-241-10/+3
| | | | | | 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.
* profiles/input: Fix usage of PATH_MAXJohan Hedberg2014-07-111-2/+1
| | | | | | 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.
* cups: Remove dead codeAndrei Emeltchenko2014-07-041-6/+1
|
* HDP: Fix adding missing breaksAndrei Emeltchenko2014-06-301-0/+2
|
* lib/uuid: Add define for Scan Parameter UUIDLuiz Augusto von Dentz2014-06-271-2/+0
|
* HDP: Fix NULL checkAndrei Emeltchenko2014-06-251-1/+1
| | | | Improves readability of the code using similar check for not NULL.
* HDP: trivial: Remove empty linesAndrei Emeltchenko2014-06-251-2/+0
|
* HDP: Fix possible memory leakAndrei Emeltchenko2014-06-251-7/+9
|
* mcap: Fix possible overflowAndrei Emeltchenko2014-06-251-1/+1
|
* HDP: Fix checking always constant error codeAndrei Emeltchenko2014-06-251-5/+2
| | | | | Function sdp_set_add_access_protos() always returns 0, so there is no sense to check for error code.