|
Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
#include <cstring>#include <string>#include <memory>#include <cstdint>#include <vector>#include <cstdio>#include <algorithm>#include <jau/debug.hpp>#include "L2CAPComm.hpp"#include "DBTConst.hpp"#include "BTIoctl.hpp"#include "L2CAPIoctl.hpp"#include "BTDevice.hpp"#include <unistd.h>#include <sys/socket.h>#include <poll.h>#include <pthread.h>#include <signal.h>Go to the source code of this file.
Macros | |
| #define | CASE2_TO_STRING(U, V) case U::V: return #V; |
| #define | RWEXITCODE_ENUM(X) |
Variables | |
| constexpr const bool | SET_BT_SECURITY_POST_CONNECT = true |
| Setting BT_SECURITY within open() after bind() and before connect() causes BlueZ/Kernel to immediately process SMP, leading to a potential deadlock. More... | |
| #define RWEXITCODE_ENUM | ( | X | ) |
Definition at line 497 of file L2CAPComm.cpp.
| #define CASE2_TO_STRING | ( | U, | |
| V | |||
| ) | case U::V: return #V; |
Definition at line 508 of file L2CAPComm.cpp.
|
inlineconstexpr |
Setting BT_SECURITY within open() after bind() and before connect() causes BlueZ/Kernel to immediately process SMP, leading to a potential deadlock.
Here we experience, setting security level before connect() will block the thread within connect(), potentially a mutex used in the SMP procedure.
Hence we set BT_SECURITY after connect() within open().
Definition at line 82 of file L2CAPComm.cpp.