Return-Path: Message-ID: Date: Fri, 11 Aug 2006 16:03:26 -0300 From: "Ulisses Furquim" To: "Marcel Holtmann" Subject: Re: [Bluez-devel] "File descriptor in bad state" on sdp_connect() Cc: "BlueZ development" In-Reply-To: <1155236923.4492.49.camel@aeonflux.holtmann.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed References: <44D88EC1.7010009@pracucci.com> <44D8815D.4000108@infitsrl.com> <1155236923.4492.49.camel@aeonflux.holtmann.net> List-ID: Hi Marcel, On 8/10/06, Marcel Holtmann wrote: > The attached patch should not change any behavior, but keep track of > L2CAP connections in creation state. Please test and check the output of > dmesg. Hmm.. actually it changes the behavior a little bit. This part: default: conn = hcon->l2cap_data; if (!conn) break; spin_lock_bh(&l2cap_conn_lock); list_del(&conn->list); spin_unlock_bh(&l2cap_conn_lock); l2cap_conn_del(hcon, bt_err(status)); break; should be like the following code. Otherwise we end up not calling l2cap_conn_del() on hcon, right? (or am I missing anything?) default: if ((conn = hcon->l2cap_data)) { spin_lock_bh(&l2cap_conn_lock); list_del(&conn->list); spin_unlock_bh(&l2cap_conn_lock); } l2cap_conn_del(hcon, bt_err(status)); break; Best regards, -- Ulisses