|
From: Peter K. <pk...@us...> - 2001-07-31 18:35:08
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
test.c 1.19 1.20=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Fixed a couple of compiler warnings.
* Corrected indentation.
The diff of the modified file(s):
--- test.c 2001/07/31 17:28:05 1.19
+++ test.c 2001/07/31 18:35:07 1.20
@@ -155,7 +155,6 @@
l2cap_register_upper(L2CAP_TEST2_LAYER, &this_layer);
l2cap_register_upper(L2CAP_TEST3_LAYER, &this_layer);
//l2cap_register_upper(7, &this_layer);
-=20
}
=20
void test_shutdown(void)
@@ -187,15 +186,12 @@
return 0;
}
=20
-static s32 t_init =3D -1;
-
-#ifdef __KERNEL__
-struct tq_struct test_task;
-#endif
-
void test_connect_ind(l2cap_con *l2cap)=20
{
#ifdef __KERNEL__
+ struct tq_struct test_task;
+ static s32 t_init =3D -1;
+
if (t_init < 0)
t_init =3D jiffies;
#endif
@@ -223,9 +219,8 @@
mark_bh(IMMEDIATE_BH);
#endif
}
-=09=09
-
#endif
+
printk("Shutting off authorization pending.\n");
emulate_pending =3D 0;
printk("Sending connect rsp with result =3D success back\n");
@@ -258,7 +253,6 @@
testcon3 =3D l2cap;
// else
// testcon =3D l2cap;
-
}
=20
/* only client receives connect pnd */
@@ -283,8 +277,7 @@
D_STATE("test_connect_cfm\n");
PRINTPSM(l2cap);
=20=09
- if ( !l2ca_local_conf_done(l2cap) )
- {
+ if (!l2ca_local_conf_done(l2cap)) {
if (dont_send_config_req){
printk("Don't send back config_req...\n");
printk("Now waiting for initator to shutdown link...\n");
@@ -296,12 +289,10 @@
if(l2ca_config_req(l2cap, 1280, NULL, 0x1234, 0)) {
D_ERR("test_config_cfm : Configuration request failed\n"); }
} else {
-=09=09=09
if(l2ca_config_req(l2cap, 0, NULL, 0, 0)){
D_ERR("test_config_cfm : Configuration request failed\n"); }
}
=20=09=09
-
/* store connection */
=20
if (l2cap->psm =3D=3D L2CAP_TEST_LAYER)
@@ -317,7 +308,6 @@
}
=20
=20
-
/* someone wants to configure l2cap... */
void=20
test_config_ind(l2cap_con* l2cap)
@@ -336,8 +326,7 @@
printk("test_config_ind : already have sent back a pos response\n");
=20
/* check if we received a pos response on a previous config req */=20
- if (!l2ca_local_conf_done(l2cap))
- {
+ if (!l2ca_local_conf_done(l2cap)) {
u16 tmp_mtu;
=20
/* still haven't sent config request yet */
@@ -432,37 +421,35 @@
}
=20
/* assumes int at end of string */
-int my_atoi(u8 *str)
+int
+my_atoi(u8 *str)
{
int i =3D 0, mult =3D 1;
int len =3D strlen(str);
int res=3D0;
=20=20=20
- for (i=3Dlen-1; i>=3D0; i--)
- {
+ for (i =3D len-1; i >=3D 0; i--) {
if ((str[i] <=3D '9') && (str[i] >=3D '0' )) {
res +=3D mult*(str[i]-'0');
mult*=3D10;
}
else=20
return -1;
-=09=20=20
}=20=20
+
return res;
}
=20
-void test_process_cmd(unsigned char *cmd, s32 size)
+void
+test_process_cmd(unsigned char *cmd, s32 size)
{
#ifdef CONFIG_BLUETOOTH_UNPLUG_TEST=20
int testcase =3D my_atoi(cmd+2);
=20
- if (testcase > 0)
- {
+ if (testcase > 0) {
print_data("Going to send: ", cmd, size);
process_test_cmd(testcase);
- }
- else
- {
+ } else {
/* other stuff */
}
#else
@@ -470,6 +457,5 @@
#endif
=20
}
-
=20
/****************** END OF FILE sdp.c ************************************=
***/
|