From 369658c499037ce52de535f8390b472588dabc4d Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Thu, 20 Jun 2013 22:25:33 +0000 Subject: inform expert info layer about the current number of packet comments when the last comment is removed and we have no other expert info, the maximum severity is changed from comment to none svn path=/trunk/; revision=50091 --- epan/expert.c | 7 +++++++ epan/expert.h | 3 +++ 2 files changed, 10 insertions(+) (limited to 'epan') diff --git a/epan/expert.c b/epan/expert.c index 901d12cf6a..9022ca2012 100644 --- a/epan/expert.c +++ b/epan/expert.c @@ -145,6 +145,13 @@ expert_get_highest_severity(void) return highest_severity; } +void +expert_update_comment_count(guint64 count) +{ + if (count==0 && highest_severity==PI_COMMENT) + highest_severity = 0; +} + expert_module_t *expert_register_protocol(int id) { expert_module_t *module; diff --git a/epan/expert.h b/epan/expert.h index 5feb28609c..5dcef2ed79 100644 --- a/epan/expert.h +++ b/epan/expert.h @@ -126,6 +126,9 @@ expert_packet_cleanup(void); WS_DLL_PUBLIC int expert_get_highest_severity(void); +WS_DLL_PUBLIC void +expert_update_comment_count(guint64 count); + /** Add an expert info. Add an expert info tree to a protocol item using registered expert info item @param pinfo Packet info of the currently processed packet. May be NULL if -- cgit v1.2.3