|
From: Mattias A. <mat...@us...> - 2001-03-20 12:10:57
|
The following file was modified in apps/bluetooth/btd:
Name Old version New version Comment
---- ----------- ----------- -------
btd.c 1.87 1.88=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* updated bt_receive_top for usermode
* minor adjustments when running usermode stack with hci emulation enabled
*=A0fixed BT_DATA debug macro
The diff of the modified file(s):
--- btd.c 2001/03/13 22:21:16 1.87
+++ btd.c 2001/03/20 12:13:17 1.88
@@ -200,7 +200,7 @@
const char* psmname(unsigned short psm);
int bt_write_lower_driver(unsigned char *data, int len);
int bt_write_top(char *buf, int count, int line);
-int bt_receive_top(rfcomm_con *rfcomm, unsigned char *data, int len);
+int bt_receive_top(unsigned int con_id, unsigned char *data, int len);
void bt_rfcomm_connection_ready(int status);
void bt_sdp_connection_ready(int status);
int bt_initiated(void);
@@ -226,9 +226,9 @@
pthread_t read_thread;
=20
#if BT_DATA_DEBUG
-#define BT_DATA(fmt, args...) printf("BT DATA "fmt, ## args)
+#define BT_DATA(fmt...) printf("BT DATA "fmt)
#else
-#define BT_DATA(fmt, args...)=20
+#define BT_DATA(fmt...)=20
#endif
=20
#if BT_DATAFLOW_DEBUG
@@ -665,6 +665,7 @@
do_reset =3D 0;
modem_emulation =3D 0;
hw_init =3D 0;
+ enter_cmd_mode =3D 1; /* temp fix until bt_waitline works for usermo=
de */
break;
=20
case 'T':
@@ -2314,11 +2315,11 @@
return bytes_sent;
}
=20
-int bt_receive_top(rfcomm_con *rfcomm, unsigned char *data, int len)
+int bt_receive_top(unsigned int con_id, unsigned char *data, int len)
{
int n;
=20
- BT_DATA(" |X|--> %3d [%d]\n", len, rfcomm->line);
+ BT_DATA(" |X|--> %3d [%d]\n", len, GET_RFCOMMLINE(con_id));
=20
if (modem_emulation && !modem_connected)
{
@@ -2877,6 +2878,7 @@
#else
/* fixme -- !*/
printf("bt_waitline : not impl in usermode stack\n");
+ sleep(2);
#endif
}
=20
|