logo       

RE: Rfcomm Use Count: msg#00081

linux.bluez.devel

Subject: RE: Rfcomm Use Count

Hi Daryl,

> At the moment I think calling ...sock_close() and ...sock_kill() in that
> function is wrong. However I am not 100% sure.

maybe this one helps:

--- 1.29/net/bluetooth/rfcomm/sock.c 2004-06-04 02:41:47 +02:00
+++ edited/net/bluetooth/rfcomm/sock.c 2004-09-22 00:12:34 +02:00
@@ -104,8 +104,13 @@
if (d->state == BT_CONNECTED)
rfcomm_session_getaddr(d->session, &bt_sk(sk)->src,
NULL);
sk->sk_state_change(sk);
- } else
+ } else {
+ if (d->state == BT_CLOSED) {
+ bt_accept_unlink(sk);
+ sk->sk_zapped = 1;
+ }
parent->sk_data_ready(parent, 0);
+ }

bh_unlock_sock(sk);
}

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise