When a configuration had been restored from last_used cache but it
fails invalidate it so another sep can be used.
Fixes: https://github.com/bluez/bluez/issues/313
Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
static void invalidate_remote_cache(struct a2dp_setup *setup,
struct avdtp_error *err)
{
-if (err->category == AVDTP_ERRNO ||
- err->err.error_code != AVDTP_UNSUPPORTED_CONFIGURATION)
+ if (err->category == AVDTP_ERRNO)
return;
- /* Attempt to unregister Remote SEP if configuration
- * fails with Unsupported Configuration and it was
+ /* Attempt to unregister Remote SEP if configuration fails and it was
* loaded from cache.
*/
if (setup->rsep && setup->rsep->from_cache) {