|
From: Peter K. <pk...@us...> - 2001-04-11 12:42:30
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_if.c 1.5 1.6=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Corrected indentation.
The diff of the modified file(s):
--- bt_if.c 2001/03/30 12:31:46 1.5
+++ bt_if.c 2001/04/11 12:42:30 1.6
@@ -268,9 +268,9 @@
void bt_showstatus(void)
{
#ifdef BT_USERSTACK
-
char tmp[4096];
int len;
+
len =3D bt_read_internal(tmp);
tmp[len] =3D 0;
printf("%s", tmp);
@@ -280,7 +280,6 @@
#endif=20
}
=20
-
/* fixme<1> -- add usermode stack version */
int
bt_send(int fd, int len, int repeat)
@@ -325,8 +324,7 @@
}
=20=20=20=20=20
repeat--;
- printf("%6d kB left to send... \r",
- ((repeat*len)/1000));
+ printf("%6d kB left to send... \r", ((repeat*len)/1000));
fflush(stdout);
}
gettimeofday(&stop_t, NULL);
@@ -342,7 +340,6 @@
}
=20
=20
-
void
bt_waitline(int bt_fd, int line)
{
@@ -436,14 +433,12 @@
}
else
printf("Success!\n");
-
#else
ret_val =3D l2ca_ping(bd, data, len);
#endif
return ret_val;
}
=20
-
int=20
bt_getinfo(int bt_cfd, unsigned char bd[6], unsigned short type)
{
@@ -467,7 +462,6 @@
return ret_val;
}
=20
-
int bt_testcmd(int bt_cfd, unsigned char *cmd)
{
int ret_val;
@@ -491,6 +485,7 @@
int bt_force_msswitch_as_server(int bt_cfd, int enable)
{
int ret_val;
+
syslog(LOG_INFO, "bt_force_msswitch_as_server : % d\n"), enable;
#ifndef BT_USERSTACK=20
if ((ret_val =3D ioctl(bt_cfd, BTSETMSSWITCH, &enable)) !=3D 0)
@@ -569,6 +564,7 @@
int bt_set_baudrate(int bt_cfd, int spd)
{
int result;
+
syslog(LOG_INFO, "bt_set_baudrate %d baud", spd);
#ifdef BT_USERSTACK
tcflush(phys_fd, TCIOFLUSH);
@@ -595,16 +591,17 @@
#else
int i;
BD_ADDR rev_bd;
+
hci_read_local_bd(rev_bd);
=20
/* return as big endian */
- for (i =3D 0; i < 6; i++) {
+ for (i =3D 0; i < 6; i++)
+ {
bd_addr[i] =3D rev_bd[5-i];
}
#endif
}
=20
-
void
enable_dut(int bt_cfd)
{
@@ -640,7 +637,6 @@
for (i =3D 0; i < 6; i++) {
bd_addr[i] =3D rev_bd[5-i];
}
-
#endif
}
=20
@@ -678,6 +674,7 @@
#else
{
unsigned int tmp [2];=20=20
+
tmp[0] =3D interval;
tmp[1] =3D wind;
=20=20=20=20=20
@@ -741,13 +738,16 @@
hci_write_class_of_device(class_of_device);
#endif
break;
+
case 1:
syslog(LOG_INFO, "bt_set_classofdevice, Unsupported format 0x%02x\n",=
=20
format);
break;
+
case 2:
syslog(LOG_INFO, "bt_set_classofdevice, Unsupported format 0x%02x\n", =
format);
break;
+
default:
syslog(LOG_INFO, "bt_set_classofdevice, Unsupported format 0x%02x\n", =
format);
break;
@@ -1020,7 +1020,7 @@
#define BT_DATA(fmt...) do {print_time(1);printk(BT_DBG_STR"DATA " fmt);} =
while (0)
#else
#define BT_DATA(fmt...) printk(BT_DBG_STR"DATA " fmt)
-#endif
+#endif /* BT_USE_TIMESTAMPS */
=20
#else /* BT_DATA_DEBUG */
#define BT_DATA(fmt...)
@@ -1030,8 +1030,7 @@
int init_read_thread(void)
{
printf("Initiating read thread\n");
- if (pthread_create(&read_thread, NULL,=20
- (void*)hci_receive_thread, NULL)!=3D0)
+ if (pthread_create(&read_thread, NULL, (void*)hci_receive_thread, NULL) =
!=3D 0)
perror("pthread_create");=20=20=20=20
sleep(1); /* wait for thread to start */
return 0;
@@ -1152,7 +1151,6 @@
BT_DATADUMP("|X|-->", data, len);
=20
#if 0 /* fixme */
-
if (modem_emulation && !modem_connected)
{
modem_emulator(0xb055e, data, len);
@@ -1214,10 +1212,8 @@
=20=09
switch (psm) {
case RFCOMM_LAYER:
- {=09
printf("bt_connect_cfm [%s]\n", psmname(psm));
break;
- }
=20=20=20=20=20=20=20=20=20=20=20
case SDP_LAYER:
printf("bt_connect_cfm [%s]\n", psmname(psm));
@@ -1237,8 +1233,7 @@
bt_disconnect_ind(unsigned int con_id)=20
{
if (GET_PSM(con_id) =3D=3D RFCOMM_LAYER)
- printf("bt_disconnect_ind : RFCOMM dlci : %d\n",=20
- GET_RFCOMMDLCI(con_id));
+ printf("bt_disconnect_ind : RFCOMM dlci : %d\n", GET_RFCOMMDLCI(con_id=
));
else
printf("bt_disconnect_ind : psm %d\n", GET_PSM(con_id));
}
@@ -1266,4 +1261,4 @@
{
return bt_initdone;
}
-#endif
+#endif /* BT_USERSTACK */
|