[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bluetooth-dev] Connection management problem : modifications + bug corrected
Le Mardi 31 Juillet 2001 16:49, Mattias Ågren a écrit :
> can you please make a 'cvs diff -udw rfcomm.c' instead ?
> It is easier to see your changes.
> > bt_disconnect_ind(CREATE_RFCOMM_ID(rfcomm->line,
> > tmp_dlci));
> > //dli
> > #ifdef __KERNEL__
> > bt_unregister_rfcomm(rfcomm->line);
> > #endif
> > }
> > D_CTRL(FNC"DISC, sending back UA\n");
> > break;
> Isn't it nicer if rfcomm.c handles the call for bt_unregister_rfcomm ?
What do you mean ? bt_unregister_rfcomm is in bluetooth.c it is called in
rfcomm.c (your design)...
> > /* Check that the pid closing is the one that opened the tty */
> > //dli why ?
> Since bt_unregister_tty is called from bt_close. If someone tries to open
> a tty which is busy it will get error on bt_open but will still call
> bt_close which in turn will change the state of that line if the pid check
> is missing. This should probably be solved differently but will have to do
> for now.
> > Remark on this last modification :
> > Why should the pid be the same ? On my application, this test
> > fails causing
> > the kernel to crash when the tty is tried to be opened...
> Not on mine ;) Can you describe in detail what goes wrong ?
On my system, this test :
if (current->pid != bt_ctrl.session[line].pid)
BT_DRIVER(__FUNCTION__" invalid pid\n");
always fails (I see the invalid pid printed out)... I agree it shouldn't...
maybe the value of bt_ctrl.session[line].pid is corrupted somewhere...
I should add the two pid values in the error message...
To unsubscribe from this list: send the line "unsubscribe bluetooth-dev" in
the body of a message to email@example.com