From: Peter K. <pk...@us...> - 2001-06-15 12:36:26
|
The following files were modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20 bt_if.h 1.13 1.14=20=20=20=20=20=20=20=20=20=20=20=20 btd.c 1.21 1.22=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): --- bt_if.c 2001/06/13 12:26:05 1.19 +++ bt_if.c 2001/06/15 12:36:25 1.20 @@ -642,12 +642,12 @@ printf("done.\n"); } =20 -/* fixme<1> -- add "line" parameter to differentiate between the=20 - remote devices */ void -read_remote_bd(int bt_cfd, unsigned char *bd_addr) +read_remote_bd(int bt_cfd, int line, unsigned char *bd_addr) { #ifndef BT_USERSTACK + *(int*)bd_addr =3D line; + if (ioctl(bt_cfd, BTREADREMOTEBDADDR, bd_addr) < 0) { perror(__FUNCTION__); @@ -656,7 +656,7 @@ BD_ADDR rev_bd; int i; =20 - get_remote_bd(rev_bd); + get_remote_bd(line, rev_bd); =20 /* return as big endian */ for (i =3D 0; i < 6; i++) { --- bt_if.h 2001/06/13 12:25:02 1.13 +++ bt_if.h 2001/06/15 12:36:25 1.14 @@ -144,7 +144,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]) @@ -319,7 +319,7 @@ int bt_set_baudrate(int bt_cfd, int spd); void bt_set_bd_addr(int bt_cfd, unsigned char *bd); void read_local_bd(int bt_cfd, unsigned char *bd_addr); -void read_remote_bd(int bt_cfd, unsigned char *bd_addr); +void read_remote_bd(int bt_cfd, int line, unsigned char *bd_addr); void role_switch(int bt_cfd, unsigned char *bd_addr, int role); =20 int bt_set_event_filter(int bt_cfd, unsigned char filter[3]); --- btd.c 2001/06/14 15:13:23 1.21 +++ btd.c 2001/06/15 12:36:25 1.22 @@ -415,7 +415,7 @@ syslog(LOG_INFO, "Found connection on line: %d", line); STATE(line) =3D CONNECTED; =20=20=20=20=20=20=20 - read_remote_bd(bt_cfd, PEER(line).remote_bd); + read_remote_bd(bt_cfd, line, PEER(line).remote_bd); printf("Remote bd: %s\n", bd2str(PEER(line).remote_bd)); =20=20=20=20=20=20=20 if (ipa_available) |