Re: [PATCH 2/2] Bluetooth: Add support for encryption key refresh

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

 



Hi Andrei,

On Thu, Jun 07, 2012, Andrei Emeltchenko wrote:
> > +	if (conn->state == BT_CONFIG) {
> > +		if (!ev->status)
> > +			conn->state = BT_CONNECTED;
> > +
> > +		hci_proto_connect_cfm(conn, ev->status);
> > +		hci_conn_put(conn);
> > +	} else {
> > +		hci_auth_cfm(conn, ev->status);
> > +
> > +		hci_conn_hold(conn);
> 
> If you want to keep extra hold(conn) you may just not put. Is this typo?
> 
> > +		conn->disc_timeout = HCI_DISCONN_TIMEOUT;
> > +		hci_conn_put(conn);
> > +	}

This is just copy-paste from hci_auth_complete_evt(). I think the
intention of the hold+put is to restart or remove the disconnect timer
with the new disc_timeout value or something similar. If the code above
needs fixing then so does the code in hci_auth_complete_evt().

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