shangdawei / btstack

Automatically exported from code.google.com/p/btstack
0 stars 1 forks source link

Patch for /trunk/src/rfcomm.c #441

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In API Definition, 
rfcomm_send_packet_for_multiplexer(multiplexer, address, BT_RFCOMM_SABM, 0, 
NULL, 0); used one of the function parameter as the Macro BT_RFCOMM_SABM. 
I thought of it seems to be a Bug, you may either modify the API definition 
with suitable function parameter other than Macro.

Original issue reported on code.google.com by rajasekh...@gmail.com on 9 Feb 2015 at 8:07

Attachments:

GoogleCodeExporter commented 9 years ago
Hi

can you explain a bit more? 

in many functions like rfcomm_send_sabm I use a #define / macro as a constant 
value

Original comment by matthias.ringwald@gmail.com on 17 Feb 2015 at 9:46

GoogleCodeExporter commented 9 years ago
As per the API Definition:
int rfcomm_send_packet_for_multiplexer(rfcomm_multiplexer_t *multiplexer, 
uint8_t address, uint8_t control, uint8_t credits, uint8_t *data, uint16_t len){
}

Above API, called many times with in the file /trunk/src/rfcomm.c, as 
rfcomm_send_packet_for_multiplexer(multiplexer, address, BT_RFCOMM_SABM, 0, 
NULL, 0);

here Fuintion parameter uint8_t as BT_RFCOMM_SABM.

Original comment by rajasekh...@gmail.com on 18 Feb 2015 at 3:32