tests: fix bsim bt l2cap send_on_connect to fail on err < 0
bt_l2cap_chan_send returns the total bytes sent from the buf, hence test should only fail when it returns a negative error code and not a positive number of bytes sent. Signed-off-by: Tom Finet <tom.codeninja@gmail.com>
This commit is contained in:
parent
b32ea30c75
commit
4474860744
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ static void chan_connected_cb(struct bt_l2cap_chan *l2cap_chan)
|
|||
|
||||
/* Try to send data */
|
||||
err = bt_l2cap_chan_send(l2cap_chan, buf);
|
||||
if (err) {
|
||||
if (err < 0) {
|
||||
FAIL("Could not send data, error %d\n", err);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue