Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314385
b: refs/heads/master
c: 2827011
h: refs/heads/master
i:
  314383: a7f760f
v: v3
  • Loading branch information
Mat Martineau authored and Johan Hedberg committed Jun 5, 2012
1 parent 742e2f1 commit 46cd07b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9dc9affcb776b75f6d3e5d69d6e2a679407854f1
refs/heads/master: 2827011f666e157f3307d55070a75e1d1110b194
1 change: 1 addition & 0 deletions trunk/include/net/bluetooth/l2cap.h
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ enum {
CONF_EWS_RECV,
CONF_LOC_CONF_PEND,
CONF_REM_CONF_PEND,
CONF_NOT_COMPLETE,
};

#define L2CAP_CONF_MAX_CONF_REQ 2
Expand Down
7 changes: 5 additions & 2 deletions trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,9 @@ struct l2cap_chan *l2cap_chan_create(void)

atomic_set(&chan->refcnt, 1);

/* This flag is cleared in l2cap_chan_ready() */
set_bit(CONF_NOT_COMPLETE, &chan->conf_state);

BT_DBG("chan %p", chan);

return chan;
Expand Down Expand Up @@ -509,8 +512,7 @@ static void l2cap_chan_del(struct l2cap_chan *chan, int err)

release_sock(sk);

if (!(test_bit(CONF_OUTPUT_DONE, &chan->conf_state) &&
test_bit(CONF_INPUT_DONE, &chan->conf_state)))
if (test_bit(CONF_NOT_COMPLETE, &chan->conf_state))
return;

skb_queue_purge(&chan->tx_q);
Expand Down Expand Up @@ -923,6 +925,7 @@ static void l2cap_chan_ready(struct l2cap_chan *chan)

BT_DBG("sk %p, parent %p", sk, parent);

/* This clears all conf flags, including CONF_NOT_COMPLETE */
chan->conf_state = 0;
__clear_chan_timer(chan);

Expand Down

0 comments on commit 46cd07b

Please sign in to comment.