diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-03-08 19:41:52 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-03-08 19:41:52 +0000 |
commit | c74dac3af94c1c8a4ec06bfaf6b6dff58212bebb (patch) | |
tree | 7d25eb2eecc5b7960267ff39be0ad61783edd0d9 /plugins | |
parent | aaedc080ea09abb03b6ce1d5e2acd4ac8befbf12 (diff) |
Use "tvb_format_text()" on the port name, so that if there are bytes in
it that aren't printable characters, they'll be shown as C-style escape
sequences.
svn path=/trunk/; revision=10343
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/irda/packet-ircomm.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/irda/packet-ircomm.c b/plugins/irda/packet-ircomm.c index f67c90bab7..b4d476fe2a 100644 --- a/plugins/irda/packet-ircomm.c +++ b/plugins/irda/packet-ircomm.c @@ -3,7 +3,7 @@ * By Jan Kiszka <jan.kiszka@web.de> * Copyright 2003 Jan Kiszka * - * $Id: packet-ircomm.c,v 1.2 2004/03/07 22:46:04 guy Exp $ + * $Id: packet-ircomm.c,v 1.3 2004/03/08 19:41:52 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -276,7 +276,6 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, unsigned offset, packet proto_item* ti; proto_tree* p_tree; char buf[256]; - char *str; guint8 pv; @@ -337,9 +336,8 @@ static gboolean dissect_ircomm_parameters(tvbuff_t* tvb, unsigned offset, packet case IRCOMM_PORT_NAME: /* XXX - the IrCOMM V1.0 spec says this "Normally human readable text, but not required". */ - str = tvb_get_string(tvb, offset+2, p_len); - proto_item_append_text(ti, ": Port Name (\"%s\")", str); - g_free(str); + proto_item_append_text(ti, ": Port Name (\"%s\")", + tvb_format_text(tvb, offset+2, p_len)); break; |