|
From: Peter K. <pk...@us...> - 2001-08-29 08:34:44
|
The following file was modified in apps/bluetooth/experimental:
Name Old version New version Comment
---- ----------- ----------- -------
bt_misc.c 1.12 1.13=20=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
Rewrote print_data() to handle a NULL message.
The diff of the modified file(s):
--- bt_misc.c 2001/08/17 16:23:21 1.12
+++ bt_misc.c 2001/08/29 08:34:43 1.13
@@ -384,16 +384,22 @@
void=20
print_data(const char *message, const unsigned char *buf, int len)
{=20
- int t;
+ int t =3D 0;
=20
- printf("\n%s (%d)", message, len);
- for (t =3D 0; t < len; t++)=20
+ if (message)
+ {
+ printf("\n%s (%d):\n", message, len);
+ }
+ while (t < len)
{
+ printf("0x%02x ", (uint)buf[t++]);
if(!(t % 16))
printf("\n ");
- printf("0x%02x ", (uint)buf[t]);
}
+ if (t && (t % 16))
+ {
printf("\n");
+ }
}
#endif
=20
|