diff options
Diffstat (limited to 'net/ax25/ax25_std_timer.c')
| -rw-r--r-- | net/ax25/ax25_std_timer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ax25/ax25_std_timer.c b/net/ax25/ax25_std_timer.c index 957f5e5fec81..604b4fe3ee4a 100644 --- a/net/ax25/ax25_std_timer.c +++ b/net/ax25/ax25_std_timer.c @@ -37,7 +37,7 @@ void ax25_std_heartbeat_expiry(ax25_cb *ax25) case AX25_STATE_0: /* Magic here: If we listen() and a new link dies before it is accepted() it isn't 'dead' so doesn't get removed. */ - if (ax25->sk == NULL || ax25->sk->destroy || (ax25->sk->state == TCP_LISTEN && ax25->sk->dead)) { + if (ax25->sk == NULL || test_bit(SOCK_DESTROY, &ax25->sk->flags) || (ax25->sk->state == TCP_LISTEN && test_bit(SOCK_DEAD, &ax25->sk->flags))) { ax25_destroy_socket(ax25); return; } @@ -94,9 +94,9 @@ void ax25_std_idletimer_expiry(ax25_cb *ax25) ax25->sk->state = TCP_CLOSE; ax25->sk->err = 0; ax25->sk->shutdown |= SEND_SHUTDOWN; - if (!ax25->sk->dead) + if (!test_bit(SOCK_DEAD, &ax25->sk->flags)) ax25->sk->state_change(ax25->sk); - ax25->sk->dead = 1; + __set_bit(SOCK_DEAD, &ax25->sk->flags); } } |
