From a48b49121fa8074e595b453c029b7c7a28c2d560 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 16 Jan 2014 11:37:43 +0200 Subject: [PATCH] tools/bthost: Remove useless channel parameter from RFCOMM callback --- emulator/bthost.c | 9 ++++----- emulator/bthost.h | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/emulator/bthost.c b/emulator/bthost.c index b66d25322..6688948e1 100644 --- a/emulator/bthost.c +++ b/emulator/bthost.c @@ -1530,9 +1530,8 @@ static void rfcomm_sabm_recv(struct bthost *bthost, struct btconn *conn, if (!dlci || cb) { rfcomm_ua_send(bthost, conn, l2conn, 1, dlci); if (cb && cb->func) - cb->func(conn->handle, l2conn->scid, - RFCOMM_GET_CHANNEL(hdr->address), - cb->user_data, true); + cb->func(conn->handle, l2conn->scid, cb->user_data, + true); } else { rfcomm_dm_send(bthost, conn, l2conn, 1, dlci); } @@ -1590,7 +1589,7 @@ static void rfcomm_ua_recv(struct bthost *bthost, struct btconn *conn, bthost->rfcomm_conn_data->channel == channel) { if (bthost->rfcomm_conn_data->cb) bthost->rfcomm_conn_data->cb(conn->handle, - l2conn->scid, channel, + l2conn->scid, bthost->rfcomm_conn_data->user_data, true); free(bthost->rfcomm_conn_data); @@ -1609,7 +1608,7 @@ static void rfcomm_dm_recv(struct bthost *bthost, struct btconn *conn, bthost->rfcomm_conn_data->channel == channel) { if (bthost->rfcomm_conn_data->cb) bthost->rfcomm_conn_data->cb(conn->handle, - l2conn->scid, channel, + l2conn->scid, bthost->rfcomm_conn_data->user_data, false); free(bthost->rfcomm_conn_data); diff --git a/emulator/bthost.h b/emulator/bthost.h index 93e02468b..5df4f8ae7 100644 --- a/emulator/bthost.h +++ b/emulator/bthost.h @@ -90,8 +90,7 @@ void bthost_set_io_capability(struct bthost *bthost, uint8_t io_capability); void bthost_set_reject_user_confirm(struct bthost *bthost, bool reject); typedef void (*bthost_rfcomm_connect_cb) (uint16_t handle, uint16_t cid, - uint8_t channel, void *user_data, - bool status); + void *user_data, bool status); void bthost_add_rfcomm_server(struct bthost *bthost, uint8_t channel, bthost_rfcomm_connect_cb func, void *user_data); -- 2.47.3