|
From: Peter K. <pk...@us...> - 2001-03-06 11:05:59
|
The following file was modified in apps/bluetooth/sdp_server:
Name Old version New version Comment
---- ----------- ----------- -------
sdp_parser.c 1.10 1.11=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
The sdp_server no longer needs to wait for the bluetooth stack
to be initialised.
The diff of the modified file(s):
--- sdp_parser.c 2001/03/04 15:46:08 1.10
+++ sdp_parser.c 2001/03/06 11:07:37 1.11
@@ -121,9 +121,6 @@
#define UUID32_HDR 0x1a
#define UUID128_HDR 0x1c
=20
-#define BT_IOC_MAGIC 'B'
-#define BTISINITIATED _IOR(BT_IOC_MAGIC, 0x09, unsigned int)
-
/****************** TYPE DEFINITION SECTION ******************************=
***/
=20
/****************** LOCAL FUNCTION DECLARATION SECTION *******************=
***/
@@ -830,39 +827,9 @@
}
=20
#ifndef BTD_USERSTACK
-static void
-wait_till_stack_is_initiated()
-{
- int bt_cfd;
- int stack_initiated =3D 0;
-
- if ((bt_cfd =3D open("/dev/ttyBTC", O_RDWR, 0)) < 0)
- {
- perror("Can't open TTY");
- exit(1);
- }
-=20=20
- while (!stack_initiated)
- {
- if (ioctl(bt_cfd, BTISINITIATED, &stack_initiated) < 0)
- {
- perror("Checking BT stack initiated");
- exit(1);
- }
- if (!stack_initiated)
- {
- sleep(1);
- }
- }
-
- close(bt_cfd);
-}
-
void
start_srvsock(char *name)
{
- wait_till_stack_is_initiated();
-=20=20
stack_if_fd =3D open(name, O_RDWR);
if (stack_if_fd < 0)
{
|