WiimoteReal/Linux: log connect failures at WARNING level

This commit is contained in:
Ryan Hitchman 2015-01-09 22:45:03 -08:00
parent 98a189de9a
commit 1bd01469c2
1 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ bool WiimoteLinux::ConnectInternal()
if ((m_cmd_sock = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) == -1 ||
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);
m_cmd_sock = -1;
return false;
@ -187,7 +187,7 @@ bool WiimoteLinux::ConnectInternal()
if ((m_int_sock = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP)) == -1 ||
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_cmd_sock);
m_int_sock = m_cmd_sock = -1;