|
From: Anders J. <and...@us...> - 2001-11-22 14:04:01
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
l2cap_con.c 1.11 1.12=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Use the new timer object and make sure there aren't no outstanding
timers when removing a connection.
The diff of the modified file(s):
--- l2cap_con.c 2001/09/18 12:01:05 1.11
+++ l2cap_con.c 2001/11/22 14:04:00 1.12
@@ -136,8 +136,10 @@
free_con_list(void)
{
D_CON(__FUNCTION__ ": Freeing connection list\n");
- while (con_list.count)
+ while (con_list.count) {
delete_con(con_list.first);
+ }
+=09
D_CON(__FUNCTION__ ": Connection list removed\n");
}=20
=20
@@ -191,11 +193,9 @@
con->c_status =3D 0;
con->c_flags =3D 0;
=20
- con->timer.rtx_action =3D RTX_ACTION_DISCONNECT;
- con->timer.ertx_action =3D ERTX_ACTION_DISCONNECT;
- con->timer.rtx_inuse =3D 0;
- con->timer.ertx_inuse =3D 0;
- con->timer.rtx_no =3D 0;
+ con->timers.rtx.inuse =3D 0;
+ con->timers.ertx.inuse =3D 0;
+ con->timers.rtx_no =3D 0;
=20
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
con->wq =3D NULL;
@@ -436,6 +436,17 @@
/* Issue a warning if connection is not in CLOSED */
if (con->current_state !=3D CLOSED)
D_ERR("Deleting an active connection\n");
+=09
+ /* Make sure we don't have any outstanding timers on
+ this connection */
+ if(con->timers.rtx.inuse) {
+ wake_up_interruptible(&con->wq);
+ del_timer(&con->timers.rtx.timer);
+ }
+ if(con->timers.ertx.inuse) {
+ wake_up_interruptible(&con->wq);
+ del_timer(&con->timers.ertx.timer);
+ }
=20
if (con_list.count =3D=3D 1) {
/* Last element */
|