Re: [PATCHv2 19/19] Bluetooth: A2MP: Manage incoming connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mat,

On Wed, May 23, 2012 at 04:30:39PM -0700, Mat Martineau wrote:
> >+struct l2cap_chan *a2mp_channel_create(struct l2cap_conn *conn,
> >+				       struct sk_buff *skb)
> >+{
> >+	struct amp_mgr *mgr;
> >+
> >+	mgr = amp_mgr_create(conn);
> >+
> >+	BT_DBG("mgr: %p chan %p", mgr, mgr->a2mp_chan);
> >+
> >+	return mgr->a2mp_chan;
> 
> mgr can be NULL.

...

> >	chan = l2cap_get_chan_by_scid(conn, cid);
> >	if (!chan) {
> >-		BT_DBG("unknown cid 0x%4.4x", cid);
> >-		/* Drop packet and return */
> >-		kfree_skb(skb);
> >-		return 0;
> >+		if (cid == L2CAP_CID_A2MP) {
> >+			chan = a2mp_channel_create(conn, skb);
> 
> If amp_mgr_create returned NULL, then you would have to handle NULL
> from a2mp_channel_create too.

I've taken all comment in my v3 patch series.

Best regards 
Andrei Emeltchenko 

--
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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux