From aad6181f248246f91294f88ac40da8229d218672 Mon Sep 17 00:00:00 2001 From: gal Date: Thu, 8 Feb 2007 17:12:38 +0000 Subject: 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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20746 f5534014-38df-0310-8fa8-9805f1628bb7 --- asn1/cdt/cdt.cnf | 13 +++++++++---- asn1/cdt/packet-cdt-template.c | 3 ++- asn1/cdt/packet-cdt-template.h | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'asn1/cdt') 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 , Thales Norway AS + * Copyright 2005, Stig Bjørlykke , Thales Norway AS * * $Id$ * @@ -33,6 +33,7 @@ #include #include +#include #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 , Thales Norway AS + * Copyright 2005, Stig Bjørlykke , Thales Norway AS * * $Id$ * -- cgit v1.2.3