574dcfb73e3741d715f7d4394fe5d3bd587cb0d2 |
|
12-May-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Restart failed system calls interrupted with errno of EINTR In number of places we don't handle properly system calls failures when the errno is EINTR (i.e., the system call was interrupted by a signal). In all our use cases, the system calls should be restarted. The handling of the following system calls (as used in the code) has been updated/fixed: poll, send, recv, sendmsg, nanosleep, epoll_wait read - mostly (e.g., socket-like fds) write - mostly (e.g., socket-like fds) select, accept, connect Bug: 28471477 Bug: 28658141 Change-Id: I03e6f0f67e33876780fb6d02c33eb84547ba8f95
/system/bt/btif/src/btif_sock_l2cap.c
|
c00ae7734133c91cab3c0cec7b56c9e059f1b3fe |
|
20-Apr-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Add missing init/destroy of state_lock mutex Add missing init/destroy of state_lock mutex inside file btif_sock_l2cap.c. Also, add a missing unlock for the same mutex. Bug: 28296454 Change-Id: I48b8deb911d29e8dcc6b7243fd61fc3ba69046dd
/system/bt/btif/src/btif_sock_l2cap.c
|
17a1dfbadd39101faf713b2cd03a3428bda5e8da |
|
06-Apr-2016 |
Sharvil Nanavati <sharvil@google.com> |
Delete unused JV code Bug: 28068134 Change-Id: I16d017ef90269a435b8f66a58ed06d2fc89d407f
/system/bt/btif/src/btif_sock_l2cap.c
|
ab99638f9a05ae7ed04ab0a75d48cbd1d78b36e8 |
|
09-Mar-2016 |
Navin Kochar <navin.kochar@intel.com> |
Add LE L2CAP Connection Oriented Channel This implementation for LE L2CAP Connection Oriented Channel (a Bluetooth Core Spec 4.1 feature) has been tested on the following formal and informal IOP events conducted by BT SIG Sport and Fitness Working Group. * Informal IOP – Tokyo 2014 * UPF 49 – Berlin 2014 * Formal IOP – Tokyo 2014 * Formal IOP – Santa Clara 2015 Bug: 27852645 Change-Id: Ia6de62f9321a78b98930629f65078884157a9c0d Signed-off-by: Navin Kochar <navin.kochar@intel.com>
/system/bt/btif/src/btif_sock_l2cap.c
|
9b4de840e65ce051f9585c12071f4bcf5fa26ea3 |
|
20-Sep-2015 |
Srinu Jella <sjella@codeaurora.org> |
Cleanup L2CAP socket properly on close Use case: 1. Sometimes pairing pop up occurs during Android beam transfer though it is not required. 2. No OPP Tx request over OBEX if we cancel during file transfer. Precondition 1. WIFI ON and conneted with AP. Steps: 1. Pair and connect from DUT to remote. 2. Go to gallery and send a file. 3. Accept same file and stop it from remote during transfer. 4. Repeat step 2-4 10 times. Failure: OPP Tx should not fail. Root cause: Close request was not properly handled from BT-IF layer. Fix: 1. Handled the close request properly from BT-IF layer to close the socket variables and instruct the BTA layer close from there as well. 2. Clean up L2CAP socket properly on closure to free the entry registered with security manager to avoid leak in security manager records. Bug: 27852645 Change-Id: I4f5d6ac92317bcaee5f9285ba71d13eea84c737c
/system/bt/btif/src/btif_sock_l2cap.c
|
5fe6f0cf6b223e3ed6be4912d55b3ed5b41ce0cd |
|
06-Feb-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Removed checks for NULL returns after osi_calloc() / osi_malloc() Removed explicit checks for NULL pointer returns after calls to osi_calloc() and osi_malloc(), because those are not needed. If the memory allocation fails, osi_calloc() and osi_malloc() will trigger an assert. Bug: 27048759 Change-Id: I2791eb2f69c08f991f8fcdef10e101a41568cd95
/system/bt/btif/src/btif_sock_l2cap.c
|
abd70abb5e42c9431df94fe9d2c4a78a0d8d9af9 |
|
05-Feb-2016 |
Pavlin Radoslavov <pavlin@google.com> |
Replaced osi_getbuf()/osi_freebuf() with osi_malloc()/osi_free() Removed the alternative buffer allocation osi_getbuf() / osi_freebuf() and use instead osi_malloc() / osi_free(). Correspondingly, replaced usage of osi_freebuf_and_reset() with osi_free_and_reset(). Bug: 24914560 Change-Id: I7a9599ba7fa900321f087da684428133eb0ddd6b
/system/bt/btif/src/btif_sock_l2cap.c
|
0229bd4f183266b103daa18cf95c175aabe87217 |
|
03-Dec-2015 |
Adam Lesinski <adamlesinski@google.com> |
Add socket tx/rx accounting Records network traffic going over bluetooth sockets. This patch adds support for L2CAP and RFCOMM. Bug:26039657 Change-Id: Idb860b367b429fa5ef41d02684a5494a668ee8ed
/system/bt/btif/src/btif_sock_l2cap.c
|
b7a077b6aa2af20e9505a7baf0b1d6dfa2ad24e6 |
|
29-Oct-2015 |
Andre Eisenbach <eisenbach@google.com> |
Rename net_test_bluedroid to net_test_bluetooth Also remove other bluedroid references. Change-Id: I349e48e50b0a0a45ca1267a765145299837601d3
/system/bt/btif/src/btif_sock_l2cap.c
|
258c2538e3b62a8cdb403f2730c45d721e5292b4 |
|
28-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - moved GKI buffer allocation wrappers to OSI * Moved the following GKI buffer allocation functions to OSI: - GKI_getbuf() -> osi_getbuf() - GKI_freebuf() -> osi_freebuf() - GKI_get_buf_size() -> osi_get_buf_size() For now we need the osi_getbuf() / osi_freebuf() allocation wrapper, because we need to be able to call osi_get_buf_size() on the allocated buffer. In the future those should be replaced with osi_malloc() / osi_free(). Currently, the osi_malloc() buffer size internal allocation tracker does not always track the size, hence we need the osi_getbuf() wrapper. * Replaced GKI_MAX_BUF_SIZE with BT_DEFAULT_BUFFER_SIZE * Added new file include/bt_common.h that can be usee to include few files that should be included alost everywhere (e.g. bt_target.h" NOTE: This file might be removed in the future and we should include everywhere the right set of header files. * Removed some of the GKI-related references * Removed file include/gki_target.h Change-Id: Ie87830e73143de200746d54235aa99f228a95024
/system/bt/btif/src/btif_sock_l2cap.c
|
1a3844f933bd63c8a381371dabfb35c6a0249e3e |
|
25-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - Replaced usage of GKI queue with OSI fixed_queue * Added new functions to OSI: - fixed_queue_init() - fixed_queue_length() - fixed_queue_try_remove_from_queue() - fixed_queue_try_peek_last() * Renamed fixed_queue_try_peek() to fixed_queue_try_peek_first() * Replaced usage of GKI queue functions with OSI fixed_queue functions: - GKI_init_q() -> fixed_queue_new(SIZE_MAX) NOTE: unlike GKI_init_q(), fixed_queue_new() allocates memory / state that needs to be released by calling fixed_queue_free() - GKI_enqueue() -> fixed_queue_enqueue() - GKI_dequeue() -> fixed_queue_try_dequeue() NOTE: fixed_queue_try_dequeue() is non-blocking - GKI_queue_length() -> fixed_queue_length() - GKI_queue_is_empty() -> fixed_queue_is_empty() - GKI_getfirst() -> fixed_queue_try_peek_first() - GKI_getlast() -> fixed_queue_try_peek_last() - GKI_remove_from_queue() -> fixed_queue_try_remove_from_queue() - Queue elements iteration. In the fixed_queue implementation we have to use the underlying list_t mechanism to iterate over the elements. OLD: p = GKI_getfirst(queue); ... while ((p = GKI_getnext(p) != NULL) { ... } NEW: list_t *list = fixed_queue_get_list(queue); for (const list_node_t *node = list_begin(list); node != list_end(list); node = list_next(node)) { p = list_node(node); } * Remove initialization of the GKI module, because it is not needed anymore * Removed unused files in GKI: gki/common/gki_common.h gki/ulinux/gki_int.h gki/ulinux/gki_ulinux.c Change-Id: I3ff9464db75252d6faf7476a9ca67c88e535c51c
/system/bt/btif/src/btif_sock_l2cap.c
|
70ae7de9451e3dc074a048ba98b672a6ba3a4551 |
|
23-Sep-2015 |
Pavlin Radoslavov <pavlin@google.com> |
GKI cleanup - Remove GKI pool related defines * Removed pool ID related defines * Updated / renamed / cleanup buffer size related defines * Added new #define BT_DEFAULT_BUFFER_SIZE * Removed unused defines Change-Id: Ib1fbf463d1e6fda2c71631347de0c365a37ba5ce
/system/bt/btif/src/btif_sock_l2cap.c
|
08393054f0867d0f86a7f9c2eb156e67a86382c7 |
|
07-Aug-2015 |
Marie Janssen <jamuraa@google.com> |
resolved conflicts for merge of 49a86709 to mnc-dev-plus-aosp Change-Id: Icd7ec2fd78ac4383da430708a88abaeba9009437
|
49a86709488e5cfd5e23759da18bf9613e15b04d |
|
08-Jul-2015 |
Marie Janssen <jamuraa@google.com> |
build: LOG_TAG consistency, include order, build fixes Fix the order of includes across a bunch of files, and declare LOG_TAG at the top of every file in which it is used. Consistently use bt_ as a LOG_TAG prefix. Fix issues with LOG macro usage. Remove unused includes and double-includes (when in related .h) Add includes as necessary to compile cleanly (problems surfaced by reordering includes) Change-Id: Ic55520c8302b06bbc1942c10c448b20844669da6
/system/bt/btif/src/btif_sock_l2cap.c
|
9a78e8d25416325308fa700bb38459817eeb5c7a |
|
08-Jul-2015 |
Marie Janssen <jamuraa@google.com> |
am 49120dc8: build: Fix LOG_TAG define breakage, macro usage * commit '49120dc867c7818511b5afec461dfc97d17eef58': build: Fix LOG_TAG define breakage, macro usage
|
49120dc867c7818511b5afec461dfc97d17eef58 |
|
08-Jul-2015 |
Marie Janssen <jamuraa@google.com> |
build: Fix LOG_TAG define breakage, macro usage Fixes build breakages related to r.android.com/156982 Change-Id: Ib1143c41fe05a17c296226998afdb41a8cb6294a
/system/bt/btif/src/btif_sock_l2cap.c
|
d33e39f14834ddfcfad27b9bef5ffb87919a8644 |
|
07-Jul-2015 |
Marie Janssen <jamuraa@google.com> |
am db554581: build: Update osi log functions, use consistently * commit 'db554581079863974af8e1289646f5deea6fc044': build: Update osi log functions, use consistently
|
db554581079863974af8e1289646f5deea6fc044 |
|
26-Jun-2015 |
Marie Janssen <jamuraa@google.com> |
build: Update osi log functions, use consistently Update the LOG_* functions to take a tag argument which makes them more consistent with the Android Log.*(TAG, s) common syntax and removes some #define-dependency with osi/include/log.h. Also update to never use Android log functions directly. Also contains minor cleanup of some header includes. Bug: 21569831 Change-Id: If07385cafbea062232ecdbc7c673f908d5ef8921
/system/bt/btif/src/btif_sock_l2cap.c
|
5de94fbdceb7af83ac6d0eabdbb4c0b67863072d |
|
13-Jun-2015 |
Arman Uguray <armansito@google.com> |
am bb954527: build: Fix ptr <-> integer cast warnings * commit 'bb95452741bfd65723ea417c25dbd326c7568ab7': build: Fix ptr <-> integer cast warnings
|
f4b0c9242b09316b228234219b67efcbffd7eaec |
|
13-Jun-2015 |
Arman Uguray <armansito@google.com> |
am cab5fc17: gn-build: Remove all -Wno-unused-* flags from build files * commit 'cab5fc179730ce6910989307680b275195876c4d': gn-build: Remove all -Wno-unused-* flags from build files
|
bb95452741bfd65723ea417c25dbd326c7568ab7 |
|
03-Jun-2015 |
Arman Uguray <armansito@google.com> |
build: Fix ptr <-> integer cast warnings This CL removes the -Wno-pointer-to-integer-cast and -Wno-integer-to-pointer-cast flags from GN build files. The resulting errors were fixed using the following: 1. All ptr <-> integer casts are now done by using the new PTR_TO_INT/INT_TO_PTR macros defined in osi.h 2. The TIMER_PARAM_TYPE macro, defined in gki/common/gki.h and include/bt_target.h have been redefined as void* rather than UINT32. This is better, since "void*" can act as a simple container without any precision loss that would be caused by a type such as UINT32 on 64-bit systems. void* inherently is a safer container for all pointer types but UINT32 isn't. BUG=21570302 Change-Id: I4a82c4a40c91caa31e372382c40d424be220cbe3
/system/bt/btif/src/btif_sock_l2cap.c
|
cab5fc179730ce6910989307680b275195876c4d |
|
02-Jun-2015 |
Arman Uguray <armansito@google.com> |
gn-build: Remove all -Wno-unused-* flags from build files This CL removes the -Wno-unused-variable, -Wno-unused-value, and -Wno-unused-function flags from all GN build and Android.mk files (except in test/ & tools/, which are not built using GN yet). Compile warnings, caused by the newly enabled flags, have been fixed throughout the code base. Bug: 21570302 Change-Id: I1c128b62256faa17668124798341005bcd0f7315
/system/bt/btif/src/btif_sock_l2cap.c
|
eae61663a5c44f2a5757ae3df80cbc3b97fa6d60 |
|
02-Jun-2015 |
Pavlin Radoslavov <pavlin@google.com> |
Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free There were several leftover places that were still using malloc/calloc/free . Those are replaced to use osi_malloc/osi_calloc/osi_free like majority of the rest of the code. Note: There are few remaining places that are still using malloc/calloc/free: * Some of the unit tests * audio_a2dp_hw/audio_a2dp_hw.c It is used as part of the audio.a2dp.default.so library, and the bluetooth.default.so library Its usage of malloc/calloc/free should be refactored independently. Change-Id: Iafbed996e5f1ae8eb1343fb2acfadf32e515e419
/system/bt/btif/src/btif_sock_l2cap.c
|
818d0f2afb10c75125b0df9ea2bce6108268a269 |
|
21-May-2015 |
Casper Bonde <c.bonde@samsung.com> |
SAP: Make it possible to enforce a 16-digit pin code (1/5) This change enable the posibility to enforce using a 16-digit pin or MITM for a RFCOMM or L2CAP connection. This is needed for the SIM access profile. Change-Id: I02886ce284f27295205def3c66fb76372f5dab4f Signed-off-by: Casper Bonde <c.bonde@samsung.com>
/system/bt/btif/src/btif_sock_l2cap.c
|
56a3be0d6eaa1bc264736e399fb32d3094f0b513 |
|
02-Jun-2015 |
Pavlin Radoslavov <pavlin@google.com> |
Replace malloc/calloc/free with osi_malloc/osi_calloc/osi_free There were several leftover places that were still using malloc/calloc/free . Those are replaced to use osi_malloc/osi_calloc/osi_free like majority of the rest of the code. Note: There are few remaining places that are still using malloc/calloc/free: * Some of the unit tests * audio_a2dp_hw/audio_a2dp_hw.c It is used as part of the audio.a2dp.default.so library, and the bluetooth.default.so library Its usage of malloc/calloc/free should be refactored independently. Change-Id: Iafbed996e5f1ae8eb1343fb2acfadf32e515e419
/system/bt/btif/src/btif_sock_l2cap.c
|
9f2120c15220a8bc865d3a065e6121a1b4d6cf57 |
|
24-Apr-2015 |
Etan Cohen <etancohen@google.com> |
Merge commit '00e8f5e' into merge2 Change-Id: Ifa83bd342458eba33fdd11a9db38d2f9e818b759
|
949baaef237d08f482b5132dc389ae84b05113f8 |
|
16-Apr-2015 |
Ian Coolidge <icoolidge@google.com> |
Fix missing includes under glibc on new code. Change-Id: I2451f782ce3f51147ebaddc559c616eac0a2b7d9
/system/bt/btif/src/btif_sock_l2cap.c
|
f54df6b47616eeae11001b1d2e977548fe316227 |
|
15-Apr-2015 |
Vinit Deshpande <vinitd@google.com> |
Fix build issues after the merge Change-Id: Ia856311187a0b2168cb859bd8b2300ff59df6569
/system/bt/btif/src/btif_sock_l2cap.c
|
8372aa5fa535ee4f09c09981b6125b54ace31fe2 |
|
25-Mar-2015 |
Kim Schulz <k.schulz@samsung.com> |
L2CAP and SDP Search API for BT profiles (2/2) Added support for exposing L2CAP to Java such that OBEX over L2CAP is made possible. Added support to create SDP records as a seperate step.(as opposed to creating a SDP record when a BluetoothSocket is created). This allows both a RFCOMM channel and a L2CAP PSM to be included in a SDP record. (Additionally the content of the SDP record is set by the profile in Java, in stead of beeing hardcoded in the socket layer.) This completes the L2CAP channel exposure to Java. Change-Id: Iaf68a07d910145cdd33e940d73cd680f79164100
/system/bt/btif/src/btif_sock_l2cap.c
|