diff options
author | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2007-02-08 17:12:38 +0000 |
---|---|---|
committer | Graeme Lunt <graeme.lunt@smhs.co.uk> | 2007-02-08 17:12:38 +0000 |
commit | 4a6b87d35e8a87ec52fcbb776f5d0d287ec72d1c (patch) | |
tree | 8667a691d9106edeee7449f91392cede6e0e91b1 /asn1/cdt | |
parent | 06e7801472ca1415f57264e71163b4a2da0382ff (diff) | |
download | wireshark-4a6b87d35e8a87ec52fcbb776f5d0d287ec72d1c.tar.gz wireshark-4a6b87d35e8a87ec52fcbb776f5d0d287ec72d1c.tar.bz2 wireshark-4a6b87d35e8a87ec52fcbb776f5d0d287ec72d1c.zip |
This patch adds some expert info in CDT when:
- Unable to get compressed content
- Unable to uncompress content
http://www.wireshark.org/lists/wireshark-dev/200702/msg00356.html
svn path=/trunk/; revision=20746
Diffstat (limited to 'asn1/cdt')
-rw-r--r-- | asn1/cdt/cdt.cnf | 13 | ||||
-rw-r--r-- | asn1/cdt/packet-cdt-template.c | 3 | ||||
-rw-r--r-- | asn1/cdt/packet-cdt-template.h | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/asn1/cdt/cdt.cnf b/asn1/cdt/cdt.cnf index 13a1a2711d..332a9e9a03 100644 --- a/asn1/cdt/cdt.cnf +++ b/asn1/cdt/cdt.cnf @@ -66,12 +66,15 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt" #.FN_BODY CompressedContent tvbuff_t *next_tvb = NULL, *compr_tvb = NULL; + proto_item *tf = NULL; int save_offset = offset; %(DEFAULT_BODY)s if (compr_tvb == NULL) { - proto_tree_add_text (top_tree, tvb, save_offset, -1, - "[Error: Unable to get compressed content]"); + tf = proto_tree_add_text (top_tree, tvb, save_offset, -1, + "[Error: Unable to get compressed content]"); + expert_add_info_format (pinfo, tf, PI_UNDECODED, PI_ERROR, + "Unable to get compressed content"); if (check_col (pinfo->cinfo, COL_INFO)) col_append_fstr (pinfo->cinfo, COL_INFO, "[Error: Unable to get compressed content]"); @@ -81,8 +84,10 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt" next_tvb = tvb_uncompress (compr_tvb, 0, tvb_length (compr_tvb)); if (next_tvb == NULL) { - proto_tree_add_text (top_tree, tvb, save_offset, -1, - "[Error: Unable to uncompress content]"); + tf = proto_tree_add_text (top_tree, tvb, save_offset, -1, + "[Error: Unable to uncompress content]"); + expert_add_info_format (pinfo, tf, PI_UNDECODED, PI_ERROR, + "Unable to uncompress content"); if (check_col (pinfo->cinfo, COL_INFO)) col_append_fstr (pinfo->cinfo, COL_INFO, "[Error: Unable to uncompress content]"); diff --git a/asn1/cdt/packet-cdt-template.c b/asn1/cdt/packet-cdt-template.c index 8bfa5110d8..4a048aba4e 100644 --- a/asn1/cdt/packet-cdt-template.c +++ b/asn1/cdt/packet-cdt-template.c @@ -2,7 +2,7 @@ * * Routines for Compressed Data Type packet dissection. * - * Copyright 2005, Stig Bj>rlykke <stig@bjorlykke.org>, Thales Norway AS + * Copyright 2005, Stig Bjørlykke <stig@bjorlykke.org>, Thales Norway AS * * $Id$ * @@ -33,6 +33,7 @@ #include <epan/packet.h> #include <epan/oid_resolv.h> +#include <epan/expert.h> #include "packet-ber.h" #include "packet-x411.h" diff --git a/asn1/cdt/packet-cdt-template.h b/asn1/cdt/packet-cdt-template.h index ade487413b..c937608b00 100644 --- a/asn1/cdt/packet-cdt-template.h +++ b/asn1/cdt/packet-cdt-template.h @@ -2,7 +2,7 @@ * * Routines for Compressed Data Type packet dissection. * - * Copyright 2005, Stig Bj>rlykke <stig@bjorlykke.org>, Thales Norway AS + * Copyright 2005, Stig Bjørlykke <stig@bjorlykke.org>, Thales Norway AS * * $Id$ * |