diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-05-30 14:47:30 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2013-05-30 14:47:30 +0200 |
commit | 22459368442b9e77e4fa2c609ca29f4d2ec3fbc0 (patch) | |
tree | 9cb8fe9798f7b4ed91254e53f972f34b3d6f6db7 /tools | |
parent | 64dc6d595238c27f7e95c9a3722ac73577eb673f (diff) | |
download | neard-22459368442b9e77e4fa2c609ca29f4d2ec3fbc0.tar.gz neard-22459368442b9e77e4fa2c609ca29f4d2ec3fbc0.tar.bz2 neard-22459368442b9e77e4fa2c609ca29f4d2ec3fbc0.zip |
nfctool: sniffer: Fix fragmented SNEP output
Display the right string depending ont the direction.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/nfctool/snep-decode.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/nfctool/snep-decode.c b/tools/nfctool/snep-decode.c index 1a7fbc5..0578a7f 100644 --- a/tools/nfctool/snep-decode.c +++ b/tools/nfctool/snep-decode.c @@ -128,7 +128,8 @@ static int snep_frag_append(struct snep_frag *frag, frag->count++; - snep_printf_msg("Received fragment #%hu of %u bytes (total %u/%u)", + snep_printf_msg("%s fragment #%hu of %u bytes (total %u/%u)", + packet->direction == NFC_LLCP_DIRECTION_RX ? "Received" : "Sent", frag->count, packet->llcp.data_len, frag->received, frag->buffer_size); @@ -171,11 +172,13 @@ static int snep_decode_info(struct sniffer_packet *packet) frag->index = snep_get_frag_index(packet); - snep_printf_msg("Start receiving fragmented message of %u bytes", - frag->buffer_size); + snep_printf_msg("Start %s fragmented message of %u bytes", + packet->direction == NFC_LLCP_DIRECTION_RX ? "Receiving" : "Sending", + frag->buffer_size); - snep_printf_msg("Received fragment #%hu of %u bytes", frag->count, - frag->received); + snep_printf_msg("%s fragment #%hu of %u bytes", + packet->direction == NFC_LLCP_DIRECTION_RX ? "Received" : "Sent", + frag->count, frag->received); DBG("Adding frag with index 0x%x", frag->index); |