lookup connection by l2cap/rfcomm cid for data packets

This commit is contained in:
Matthias Ringwald 2015-11-13 22:56:09 +01:00
parent e4dd59a7e3
commit 96585c7d12

View File

@ -1448,9 +1448,18 @@ static void daemon_packet_handler(void * connection, uint8_t packet_type, uint16
default:
break;
}
case L2CAP_DATA_PACKET:
connection = connection_for_l2cap_cid(channel);
if (!connection) return;
break;
case RFCOMM_DATA_PACKET:
connection = connection_for_l2cap_cid(channel);
if (!connection) return;
break;
default:
break;
}
if (connection) {
socket_connection_send_packet(connection, packet_type, channel, packet, size);
} else {