Skip to content

Commit

Permalink
Add casts to new bio_dump_cb
Browse files Browse the repository at this point in the history
Some of the types weren't compatible on 32-bit architectures.
  • Loading branch information
rra committed Oct 3, 2021
1 parent d32bc1e commit 114e2ea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions nnrpd/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,23 +823,25 @@ bio_dump_cb(BIO * bio, int cmd, const char *argp, size_t len, int argi UNUSED,
if (ret > 0 && processed != NULL) {
syslog(L_NOTICE, "read from %08lX [%08lX] (%lu bytes => %lu (0x%lX))",
(unsigned long) bio, (unsigned long) argp,
len, *processed, *processed);
(unsigned long) len, (unsigned long) *processed,
(unsigned long) *processed);
tls_dump(argp, (int) *processed);
} else {
syslog(L_NOTICE, "read from %08lX [%08lX] (%lu bytes => %d (0x%lX))",
(unsigned long) bio, (unsigned long) argp,
len, ret, (unsigned long) ret);
(unsigned long) len, ret, (unsigned long) ret);
}
} else if (cmd == (BIO_CB_WRITE | BIO_CB_RETURN)) {
if (ret > 0 && processed != NULL) {
syslog(L_NOTICE, "write to %08lX [%08lX] (%lu bytes => %lu (0x%lX))",
(unsigned long) bio, (unsigned long) argp,
len, *processed, *processed);
(unsigned long) len, (unsigned long) *processed,
(unsigned long) *processed);
tls_dump(argp, (int) *processed);
} else {
syslog(L_NOTICE, "write to %08lX [%08lX] (%lu bytes => %d (0x%lX))",
(unsigned long) bio, (unsigned long) argp,
len, ret, (unsigned long) ret);
(unsigned long) len, ret, (unsigned long) ret);
}
}
return (ret);
Expand Down

0 comments on commit 114e2ea

Please sign in to comment.