diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-03-24 15:14:34 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2022-03-28 10:51:27 -0700 |
commit | 62e591578e3f948e187aacf44ede4286fad37ad7 (patch) | |
tree | 9b4a2cfb6d5d48ae8c3b6704e66a3070a656486e /profiles | |
parent | 18fc3abad28cccd2ac7e31963502973af8b86216 (diff) | |
download | bluez-62e591578e3f948e187aacf44ede4286fad37ad7.tar.gz |
a2dp: Always invalidate the cache if its configuration fails
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
Diffstat (limited to 'profiles')
-rw-r--r-- | profiles/audio/a2dp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/profiles/audio/a2dp.c b/profiles/audio/a2dp.c index d66c22b2b..c3ac432a7 100644 --- a/profiles/audio/a2dp.c +++ b/profiles/audio/a2dp.c @@ -872,12 +872,10 @@ static void store_remote_seps(struct a2dp_channel *chan) 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) { |