From 7d592cf44a553da3a64b9a7075c7e99ef38025c1 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Tue, 10 Aug 2010 18:45:02 +0000 Subject: [PATCH] don't send when in server mode --- example/l2cap-throughput.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/example/l2cap-throughput.c b/example/l2cap-throughput.c index 440617f5e..e70f4b513 100644 --- a/example/l2cap-throughput.c +++ b/example/l2cap-throughput.c @@ -166,10 +166,12 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint break; case L2CAP_EVENT_CREDITS: - // can send! (assuming single credits are handet out) - update_packet(); - local_cid = READ_BT_16(packet, 2); - bt_send_l2cap( local_cid, packet, 300); + if (!serverMode) { + // can send! (assuming single credits are handet out) + update_packet(); + local_cid = READ_BT_16(packet, 2); + bt_send_l2cap( local_cid, packet, PACKET_SIZE); + } break; default: