Export to GitHub

btstack - issue #387

sdp_try_respond is static, cannot be called when HCI transport is freed


Posted on Feb 16, 2014 by Swift Dog

r2364 function sdp_try_respond in file sdp.c

it checks if it is capable of sending something before actually sending it, if it fails because there are no ACL slots, then it is called again when ACL slots are freed (when the L2CAP credits get handed out)

but this does not account for when the HCI transport is busy, if the first attempt fails because the HCI transport is busy, there will be no reattempts

one solution is to repeatedly call this function, but this is impossible as it is declared static

I suggest that a sdp_server_run function is created, or better yet, each l2cap service should have it's own "run" function pointer just like the packet_handler function pointer, and have l2cap_run call sdp_server_run

Status: New

Labels:
Type-Defect Priority-Medium