|
From: Peter K. <pk...@us...> - 2001-06-15 12:43:17
|
The following files were modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.97 1.98=20=20=20=20=20=20=20=20=20=20=20=20
btd.h 1.37 1.38=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
read_remote_bd() now takes a line argument.
The diff of the modified file(s):
--- btd.c 2001/04/27 16:48:43 1.97
+++ btd.c 2001/06/15 12:43:15 1.98
@@ -298,7 +298,7 @@
static void bt_inquiry(int bt_cfd, int nbr_rsp, int t);
static void bt_set_bd_addr(int bt_cfd, int* bd);
static void read_local_bd(int bt_cfd, unsigned char *bd_addr);
-static void read_remote_bd(int bt_cfd, unsigned char *bd_addr);
+static void read_remote_bd(int bt_cfd, int line, unsigned char *bd_addr);
static void role_switch(int bt_cfd, unsigned char *bd_addr, int role);
#ifndef BTD_USERSTACK
static char* bt_hw_vendor(void);
@@ -2663,7 +2663,10 @@
struct ipa_client *client;
=20
read_local_bd(bt_cfd, local_bd);
- read_remote_bd(bt_cfd, remote_bd);
+
+ /* fixme -- for now only use line 0 */
+ read_remote_bd(bt_cfd, 0, remote_bd);
+
/*=20
* Get options from IPAssigner=20
*/
@@ -3054,9 +3057,11 @@
=20
/* FIXME -- add "line" parameter to differentiate between the remote devic=
es */
void
-read_remote_bd(int bt_cfd, unsigned char *bd_addr)
+read_remote_bd(int bt_cfd, int line, unsigned char *bd_addr)
{
#ifndef BTD_USERSTACK
+ *(int*)bd_addr =3D line;
+
if (ioctl(bt_cfd, BTREADREMOTEBDADDR, bd_addr) < 0)
{
perror("Read client bd addr");
@@ -3065,7 +3070,7 @@
BD_ADDR rev_bd;
int i;
=20=20
- get_remote_bd(rev_bd);
+ get_remote_bd(line, rev_bd);
=20
/* return as big endian */
for (i =3D 0; i < 6; i++) {
--- btd.h 2001/04/26 14:02:18 1.37
+++ btd.h 2001/06/15 12:43:16 1.38
@@ -60,7 +60,7 @@
#define BTSETSERTTY _IO(BT_IOC_MAGIC, 0x04)
#define BTSETMODEMDUMMY _IOW(BT_IOC_MAGIC, 0x05, int)
#define BTSHUTDOWN _IO(BT_IOC_MAGIC, 0x06)
-#define BTREADREMOTEBDADDR _IOR(BT_IOC_MAGIC, 0x07, unsigned char[6])
+#define BTREADREMOTEBDADDR _IOWR(BT_IOC_MAGIC, 0x07, unsigned char[6])
#define BTRESETPHYSICALHW _IO(BT_IOC_MAGIC, 0x08)
#define BTISINITIATED _IOR(BT_IOC_MAGIC, 0x09, int)
#define BTHWVENDOR _IOR(BT_IOC_MAGIC, 0x0A, char[20])
|