From: Mattias A. <mat...@us...> - 2001-04-17 15:45:28
|
The following file was modified in apps/bluetooth/experimental: Name Old version New version Comment ---- ----------- ----------- ------- bt_if.c 1.7 1.8=20=20=20=20=20=20=20=20=20=20=20=20=20 The accompanying log: * added more error messages The diff of the modified file(s): --- bt_if.c 2001/04/17 12:24:58 1.7 +++ bt_if.c 2001/04/17 15:45:28 1.8 @@ -62,6 +62,7 @@ #include "bt_misc.h" #include "bt_conf.h" #include "bt_user.h" +#include "bt_errno.h" =20 /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ /* Functions common for kernel and usermode stack */ @@ -858,7 +859,7 @@ /* =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ /* Misc functions */ =20 -/* See spec p 769 error codes for HCI */ +/* See bt_errno.h for error codes */ const char *error_msg(int err) { int layer =3D (err >> 16) & 0xffff; @@ -868,6 +869,8 @@ { case MSG_LAYER_HCI: { + + /* fixme -- add these as defines in bt_errno.h */ switch(code) {=20=20=20=20=20=20=20 case 0x03:=20=20=20=20=20=20=20=20 @@ -913,6 +916,43 @@ } break; =20=20=20=20=20 + case MSG_LAYER_RFCOMM: + { + /* fixme */ + return "RFCOMM - unknown reason"; + } + break; + + case MSG_LAYER_SDP: + { + /* fixme */ + return "SDP - unknown reason"; + } + break; +=20=20=20=20 + case MSG_LAYER_TCS: + { + /* fixme */ + return "TCS - unknown reason"; + } + break; +=20=20=20=20 + case MSG_BT_INTERFACE: + { + switch(code) + {=20 + case BT_NOTCONNECTED: + return "BT_INTERFACE - Not connected"; + case BT_ALREADYCONNECTED: + return "BT_INTERFACE - Already connected"; + case BT_TIMEOUT: + return "BT_INTERFACE - Timeout"; + default: + return "BT_INTERFACE - unknown reason"; + } + } + break; + default: return "General failure"; } |