diff options
author | Martijn Coenen <maco@google.com> | 2012-09-17 17:28:40 -0700 |
---|---|---|
committer | Martijn Coenen <maco@google.com> | 2012-09-18 17:15:58 -0700 |
commit | 7be608bcc4495aafcb700aa61072050fdc96f3e8 (patch) | |
tree | 0ec184b0792943962309cfd34f2c94b5cc50f007 /nci/jni/SecureElement.h | |
parent | c6cf8e45c27d8a43d09b997cc223e8068d140edd (diff) | |
download | packages_apps_nfc-7be608bcc4495aafcb700aa61072050fdc96f3e8.zip packages_apps_nfc-7be608bcc4495aafcb700aa61072050fdc96f3e8.tar.gz packages_apps_nfc-7be608bcc4495aafcb700aa61072050fdc96f3e8.tar.bz2 |
Fix locking in PeerToPeer.
The PeerToPeer class had some serious multi-threading issues:
- mServers / mClients simultaneously being accessed by different threads
- P2pServer / P2pClient objects being deleted while still being used by
other threads
- Race conditions where we could go to sleep on a condition variable
without ever waking up.
This fixes most of the issues by:
- Properly locking all access to mServers / mClients
- Using Android's sp mechanism to do ref counting on P2pServer/P2pClient/NfaConn
TODO:
- Fix races around the condition variables - those are very hard to hit,
but we need them fixed anyway.
Bug: 7089048
Change-Id: I08564c65cc40734086e517d6107e31f86c3b6adc
Diffstat (limited to 'nci/jni/SecureElement.h')
0 files changed, 0 insertions, 0 deletions