log buffers
This commit is contained in:
parent
f830d43458
commit
c9c23331ca
1 changed files with 17 additions and 0 deletions
|
@ -5,6 +5,23 @@ void measure_parse(int size, struct measure_conf* mc) {
|
|||
uint64_t micro_sec;
|
||||
if (size != mc->payload_size) {
|
||||
fprintf(stderr, "read size: %d, expected: %ld\n", size, mc->payload_size);
|
||||
int i;
|
||||
|
||||
fprintf(stderr, "received buffer:\n");
|
||||
for (i = 0; i < mc->payload_size; i++) {
|
||||
if (i > 0) fprintf(stderr, ":");
|
||||
fprintf(stderr, "%02x", (unsigned char) mc->payload_rcv[i]);
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
fprintf(stderr, "local buffer (reference):\n");
|
||||
for (i = 0; i < mc->payload_size; i++) {
|
||||
if (i > 0) fprintf(stderr, ":");
|
||||
fprintf(stderr, "%02X", (unsigned char) mc->payload[i]);
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
|
||||
perror("read error, payload has wrong size");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue