Fix bug in SDP server where it would get into an infinite loop.
If the SDP database is mutated while a client is fetching SDP records, we can end up in an infinite request/response loop. Specifically, if an SDP record is deleted after a client has received the first fragment of a multi-fragment response, the server will not be able to complete the request. Instead, it will return the same continuation token back to the client which will request the next fragment and the server, again, will return the same continuation token. This process repeats forever, resulting in a large amount of unncessary BT traffic and power costs on both devices. Unfortunately, this seems to be a design flaw in the current SDP server implementation. This change simply detects the above condition and aborts the transaction entirely by returning an error to the client. Future changes will eliminate this class of problem entirely.
Loading
Please register or sign in to comment