Maksim Yevmenkin wrote:
Andrew,

# l2control -a bel Read_Channel_List
L2CAP channels:
Remote BD_ADDR     SCID/ DCID   PSM  IMTU/ OMTU State
POCKET_PC            65/   65     3     0/ 1691 OPEN

[...]

< ACL data: handle 0x0001 flags 0x02 dlen 16
    L2CAP(s): Config req: dcid 0x0041 flags 0x0000 clen 4
    MTU 0
[hmmm, MTU=0! Why?]

i think there is a bug in ng_btsocket_rfcomm.c. could you please try to change ng_btsocket_rfcomm_session_create() function and define local mtu
valiable as u_int16_t instead of int, i.e.

change

static int
ng_btsocket_rfcomm_session_create(ng_btsocket_rfcomm_session_p *sp,
                struct socket *l2so, bdaddr_p src, bdaddr_p dst,
                struct thread *td)
{
        ng_btsocket_rfcomm_session_p    s = NULL;
        struct sockaddr_l2cap           l2sa;
        struct sockopt                  l2sopt;
        int                             mtu, error;

to

static int
ng_btsocket_rfcomm_session_create(ng_btsocket_rfcomm_session_p *sp,
                struct socket *l2so, bdaddr_p src, bdaddr_p dst,
                struct thread *td)
{
        ng_btsocket_rfcomm_session_p    s = NULL;
        struct sockaddr_l2cap           l2sa;
        struct sockopt                  l2sopt;
        int                             error;
    u_int16_t            mtu;

thanks,
max


Yes, this patch solves a problem. Many thanks!
I should issue the PR?

--
With Best Regards,
Andrew Belashov.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to