aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2011-10-04 13:14:56 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2011-10-04 13:14:56 +0300
commit35530dd57919eafc76254756ed1a9356ef267853 (patch)
treef9ef5dcdf214be491802b8e489af866185db32ba
parent3c2bad1506ae3fbba3ae0693ffc146a88b8e2acb (diff)
downloadbluez-hcidump-35530dd57919eafc76254756ed1a9356ef267853.tar.gz
bluez-hcidump-35530dd57919eafc76254756ed1a9356ef267853.tar.xz
bluez-hcidump-35530dd57919eafc76254756ed1a9356ef267853.zip
att: fix format for 16-bit values
-rw-r--r--parser/att.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/parser/att.c b/parser/att.c
index 735c3b4..040da32 100644
--- a/parser/att.c
+++ b/parser/att.c
@@ -264,7 +264,7 @@ static void att_error_dump(int level, struct frame *frm)
printf("Error: %s (%d)\n", atterror2str(err), err);
p_indent(level, frm);
- printf("%s (0x%.2x) on handle 0x%2.2x\n", attop2str(op), op, handle);
+ printf("%s (0x%.2x) on handle 0x%4.4x\n", attop2str(op), op, handle);
}
static void att_mtu_req_dump(int level, struct frame *frm)
@@ -289,7 +289,7 @@ static void att_find_info_req_dump(int level, struct frame *frm)
uint16_t end = btohs(htons(get_u16(frm)));
p_indent(level, frm);
- printf("start 0x%2.2x, end 0x%2.2x\n", start, end);
+ printf("start 0x%4.4x, end 0x%4.4x\n", start, end);
}
static void att_find_info_resp_dump(int level, struct frame *frm)
@@ -305,7 +305,7 @@ static void att_find_info_resp_dump(int level, struct frame *frm)
uint16_t handle = btohs(htons(get_u16(frm)));
uint16_t uuid = btohs(htons(get_u16(frm)));
p_indent(level + 1, frm);
- printf("handle 0x%2.2x, uuid 0x%2.2x (%s)\n", handle, uuid,
+ printf("handle 0x%4.4x, uuid 0x%4.4x (%s)\n", handle, uuid,
uuid2str(uuid));
}
} else {
@@ -316,7 +316,7 @@ static void att_find_info_resp_dump(int level, struct frame *frm)
int i;
p_indent(level + 1, frm);
- printf("handle 0x%2.2x, uuid ", handle);
+ printf("handle 0x%4.4x, uuid ", handle);
for (i = 0; i < 16; i++) {
printf("%02x", get_u8(frm));
if (i == 3 || i == 5 || i == 7 || i == 9)
@@ -395,7 +395,7 @@ static void att_read_by_type_resp_dump(int level, struct frame *frm)
int i;
p_indent(level + 1, frm);
- printf("handle 0x%2.2x, value ", handle);
+ printf("handle 0x%4.4x, value ", handle);
for (i = 0; i < val_len; i++) {
printf("0x%.2x ", get_u8(frm));
}
@@ -408,7 +408,7 @@ static void att_read_req_dump(int level, struct frame *frm)
uint16_t handle = btohs(htons(get_u16(frm)));
p_indent(level, frm);
- printf("handle 0x%2.2x\n", handle);
+ printf("handle 0x%4.4x\n", handle);
}
static void att_read_blob_req_dump(int level, struct frame *frm)