|
From: Peter K. <pk...@us...> - 2001-04-04 10:31:21
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_misc.c 1.3 1.4=20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Allow 921600 as baud rate also for non-CRIS compiles.
* Minor clean-up.
The diff of the modified file(s):
--- bt_misc.c 2001/03/21 18:24:40 1.3
+++ bt_misc.c 2001/04/04 10:31:19 1.4
@@ -201,7 +201,6 @@
&client_len);
=20=20=20=20=20
return client_sockfd;
-
}
else
{
@@ -283,12 +282,9 @@
case 460800:
speed_c =3D B460800;
break;
-
-#ifdef __CRIS__
case 921600:
speed_c =3D B921600;
break;
-#endif
=20
default:
printf("Bad baudrate %d.\n", spd);
@@ -345,12 +341,13 @@
print_data(const char *message, unsigned char *buf, int len)
{=20
int t;
+
printf("\n%s (%d)", message, len);
for (t=3D0;t<len;t++)=20
{
- if((t%16)=3D=3D0)
+ if(!(t % 16))
printf("\n ");
- printf("0x%02x ", (uint)(buf[t]));
+ printf("0x%02x ", (uint)buf[t]);
}
printf("\n");
}
@@ -359,25 +356,20 @@
void set_pin_code(char *pin)
{
#ifdef __CRIS__
- /* Set pincode */
char exec_pinstr[100];=20=20=20=20=20=20=20=20
=20
- if (strncmp(pin, "disable", 7) =3D=3D 0)
+ if (strcmp(pin, "disable") =3D=3D 0)
{
printf("Disable PIN usage\n");
- system("/bin/parhandclient -nosync set root.Security.UseLANSecurity no=
");
- system("/bin/parhandclient sync");
+ system("/bin/parhandclient -nosync set root.Security.UseLANSecurity no=
sync");
return;
}
-
- /* Set pin in stack */
- sprintf(exec_pinstr, "/bin/parhandclient -nosync set root.Security.PINCo=
de %s", (char*) pin);=20=20
=20=20=20
+ /* Set pinconde */
system("/bin/parhandclient -nosync set root.Security.UseLANSecurity yes"=
);
+ sprintf(exec_pinstr, "/bin/parhandclient -nosync set root.Security.PINCo=
de %s sync", pin);=20=20
system(exec_pinstr);
- system("/bin/parhandclient sync");
#else
- printf("set_pin_code not implemented [%s, line %d]\n",=20
- __FILE__, __LINE__);
+ printf("set_pin_code not implemented [%s, line %d]\n", __FILE__, __LINE_=
_);
#endif
}
|