Diff between 557459064716e951c9502a5663ff6407e6314090 and a48b49121fa8074e595b453c029b7c7a28c2d560

Changed Files

File Additions Deletions Status
emulator/bthost.c +4 -5 modified
emulator/bthost.h +1 -2 modified

Full Patch

diff --git a/emulator/bthost.c b/emulator/bthost.c
index b66d253..6688948 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 93e0246..5df4f8a 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);