diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-02-28 13:08:01 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-02-28 13:08:01 +0000 |
commit | 3cc4bf517f4eb7f5ab0dd9e02cf7a7bc3106e1ff (patch) | |
tree | 6743514de65bc3ba99cd1f94634940c6117d04ab /src/rs232.c | |
parent | 51f38457e54a9d8c50d7d77e9b7e92465475cf84 (diff) |
make hexdump return a 'char *' rather than printing by itself
Diffstat (limited to 'src/rs232.c')
-rw-r--r-- | src/rs232.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/rs232.c b/src/rs232.c index d0825d9a0..24577ea87 100644 --- a/src/rs232.c +++ b/src/rs232.c @@ -100,10 +100,7 @@ static int handle_ser_write(struct bsc_fd *bfd) return 0; } - if (debug_mask & DMI) { - fprintf(stdout, "RS232 TX: "); - hexdump(msg->data, msg->len); - } + DEBUGP(DMI, "RS232 TX: %s", hexdump(msg->data, msg->len)); /* send over serial line */ written = write(bfd->fd, msg->data, msg->len); @@ -175,10 +172,7 @@ static int handle_ser_read(struct bsc_fd *bfd) if (msg->len > LAPD_HDR_LEN) msg->l2h = msg->data + LAPD_HDR_LEN; - if (debug_mask & DMI) { - fprintf(stdout, "RS232 RX: "); - hexdump(msg->data, msg->len); - } + DEBUGP(DMI, "RS232 RX: %s\n", hexdump(msg->data, msg->len)); rc = handle_serial_msg(msg); } } |