diff --git a/tools/parser/obex.c b/tools/parser/obex.c
index 0cf2994..3d23f5c 100644
--- a/tools/parser/obex.c
+++ b/tools/parser/obex.c
}
}
+static void print_status(uint8_t status)
+{
+ switch (status & 0x7f) {
+ case 0x10:
+ printf(" (continue)");
+ break;
+ case 0x20:
+ printf(" (success)");
+ break;
+ case 0x21:
+ printf(" (created)");
+ break;
+ case 0x22:
+ printf(" (accepted)");
+ break;
+ }
+}
+
static uint8_t last_opcode = 0x00;
static uint8_t last_status = 0x00;
if ((opcode & 0x70) == 0x00) {
printf("OBEX: %s cmd(%c): len %d",
opcode2str(opcode), opcode & 0x80 ? 'f' : 'c', length);
- if (last_status == 0x10)
- printf(" (continue)");
+ print_status(last_status);
last_opcode = opcode;
} else {
printf("OBEX: %s rsp(%c): status %x%02d len %d",
opcode2str(last_opcode), opcode & 0x80 ? 'f' : 'c',
status >> 4, status & 0xf, length);
- if (status == 0x10)
- printf(" (continue)");
+ print_status(status);
opcode = last_opcode;
}
printf("\n");
}
+ if ((status >> 4) > 2 && (parser.flags & DUMP_VERBOSE)) {
+ p_indent(level, frm);
+ printf("Error: %s\n", opcode2str(status));
+ }
+
parse_headers(level, frm);
raw_dump(level, frm);