summaryrefslogtreecommitdiff
path: root/libhfp/rfcomm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libhfp/rfcomm.cpp')
-rw-r--r--libhfp/rfcomm.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libhfp/rfcomm.cpp b/libhfp/rfcomm.cpp
index 30c7e76..8740734 100644
--- a/libhfp/rfcomm.cpp
+++ b/libhfp/rfcomm.cpp
@@ -164,7 +164,14 @@ RfcommListen(uint8_t channel)
rsock = socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM);
if (rsock < 0) {
- GetDi()->LogWarn("Create RFCOMM socket");
+ rsock = errno;
+ if (rsock == EPROTONOSUPPORT) {
+ GetDi()->LogError("Your kernel is not configured with "
+ "support for RFCOMM sockets.\n");
+ GetHub()->SetAutoRestart(false);
+ return false;
+ }
+ GetDi()->LogWarn("Create RFCOMM socket: %s", strerror(errno));
return false;
}