Bluetooth: SDP: Reset context on disconnection

Resets SDP client session data on related L2CAP transport channel
disconnection state. Leave the channel itself reset to L2CAP layer.

Jira: ZEP-1112

Change-Id: I4d8a8f10908f5e599ba6506470b98508869cb21b
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2016-12-21 15:52:17 +01:00 committed by Johan Hedberg
commit b04f3a2b17

View file

@ -340,7 +340,11 @@ static void sdp_client_disconnected(struct bt_l2cap_chan *chan)
BT_DBG("session %p chan %p disconnected", session, chan);
ARG_UNUSED(session);
/*
* Reset session excluding L2CAP channel member. Let's the channel
* resets autonomous.
*/
memset(&session->reqs, 0, sizeof(*session) - sizeof(session->chan));
}
static struct bt_l2cap_chan_ops sdp_client_chan_ops = {