• G
    Bluetooth: Extend state_change() call to report errors too · 53f52121
    Gustavo Padovan 提交于
    Instead of creating an new function pointer to report errors we are just
    reusing state_change for that and there is a simple reason for this, one
    place in the l2cap_core.c code needs, in a locked sk, set both the sk_state
    and sk_err. If we create two different functions for this we would need to
    release the lock between the two operation putting the socket in non
    desired state.
    
    The change is transparent to the l2cap_core.c code, user that only needs
    to set the state won't need any modification.
    
    This is another step of an ongoing work to make l2cap_core.c totally
    independent from l2cap's struct sock.
    Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.co.uk>
    Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
    53f52121
a2mp.c 21.1 KB