|
From: Anders J. <and...@us...> - 2001-10-03 12:12:37
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
l2cap.c 1.119 1.120=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Corrected error in l2cap_config_rsp which wrote data at the wrong address.
The diff of the modified file(s):
--- l2cap.c 2001/09/21 12:51:06 1.119
+++ l2cap.c 2001/10/03 12:12:35 1.120
@@ -778,6 +778,7 @@
CONF_FAILURE) < 0) {
D_ERR(__FUNCTION__ ": Couldn't send conf rsp\n");
}
+=09=09=09=09
return;
}
=20=09=09=09
@@ -2614,14 +2615,14 @@
=20
/* Include unaccepted options if any */
if (opt_len) {
- opt =3D (struct l2cap_option*)(rsp + CONF_RSPSIZE);
+ opt =3D (struct l2cap_option*)((u8*)rsp + CONF_RSPSIZE);
=20
if (out_mtu !=3D 0) {
DSYS("Sending out_mtu %d\n", out_mtu);
opt->type =3D OPT_MTU;
opt->len =3D 2;
- *(opt->option_data) =3D (u8)(out_mtu & 0x00ff);
- *(opt->option_data+1) =3D (u8)(out_mtu >> 8) & 0x00ff;
+ opt->option_data[0] =3D (u8)(out_mtu & 0x00ff);
+ opt->option_data[1] =3D (u8)(out_mtu >> 8) & 0x00ff;
=20=09
/* forward pointer for other options */
opt =3D (struct l2cap_option*)((char *)opt + 4);
@@ -2632,9 +2633,9 @@
print_flow(in_flow);
opt->type =3D OPT_QOS;
opt->len =3D sizeof *in_flow;
- memcpy((char*)opt+2, in_flow, sizeof *in_flow);
+ memcpy((char*)opt->option_data, in_flow, sizeof *in_flow);
}
- print_data("options: ", (u8*)rsp, opt_len + CONF_RSPSIZE);
+ print_data("options: ", (u8*)rsp + CONF_RSPSIZE, opt_len);
}
=20=09
cmd->code =3D SIG_CONFRSP;
|