If pending connection will stay after state has been changed to HEADSET_STATE_DISCONNECTED, then crash may happen (e.g. when hs_connect will be called quickly again after that) To avoid that kind of problems using headset_shutdown, which does necessary cleanup first (finalizes pending connections) and after that changes state to HEADSET_STATE_DISCONNECTED. --- audio/media.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/audio/media.c b/audio/media.c index a2ef437..a363b8e 100644 --- a/audio/media.c +++ b/audio/media.c @@ -197,7 +197,7 @@ static void headset_setconf_cb(struct media_endpoint *endpoint, void *ret, if (ret != NULL) return; - headset_set_state(dev, HEADSET_STATE_DISCONNECTED); + headset_shutdown(dev); } static void clear_configuration(struct media_endpoint *endpoint) -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html