WiimoteReal/Linux: log connect failures at WARNING level
This commit is contained in:
parent
98a189de9a
commit
1bd01469c2
|
@ -176,7 +176,7 @@ bool WiimoteLinux::ConnectInternal()
|
||||||
if ((m_cmd_sock = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) == -1 ||
|
if ((m_cmd_sock = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) == -1 ||
|
||||||
connect(m_cmd_sock, (sockaddr*)&addr, sizeof(addr)) < 0)
|
connect(m_cmd_sock, (sockaddr*)&addr, sizeof(addr)) < 0)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(WIIMOTE, "Unable to open output socket to wiimote: %s", strerror(errno));
|
WARN_LOG(WIIMOTE, "Unable to open output socket to wiimote: %s", strerror(errno));
|
||||||
close(m_cmd_sock);
|
close(m_cmd_sock);
|
||||||
m_cmd_sock = -1;
|
m_cmd_sock = -1;
|
||||||
return false;
|
return false;
|
||||||
|
@ -187,7 +187,7 @@ bool WiimoteLinux::ConnectInternal()
|
||||||
if ((m_int_sock = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) == -1 ||
|
if ((m_int_sock = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) == -1 ||
|
||||||
connect(m_int_sock, (sockaddr*)&addr, sizeof(addr)) < 0)
|
connect(m_int_sock, (sockaddr*)&addr, sizeof(addr)) < 0)
|
||||||
{
|
{
|
||||||
DEBUG_LOG(WIIMOTE, "Unable to open input socket from wiimote: %s", strerror(errno));
|
WARN_LOG(WIIMOTE, "Unable to open input socket from wiimote: %s", strerror(errno));
|
||||||
close(m_int_sock);
|
close(m_int_sock);
|
||||||
close(m_cmd_sock);
|
close(m_cmd_sock);
|
||||||
m_int_sock = m_cmd_sock = -1;
|
m_int_sock = m_cmd_sock = -1;
|
||||||
|
|
Loading…
Reference in New Issue