Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 580e43a8 authored by Sharvil Nanavati's avatar Sharvil Nanavati Committed by Andre Eisenbach
Browse files

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.
parent f1bb77fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment