From 4e4f6d67fa9e7d529f615abd131feed552b1c76a Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Tue, 4 Oct 2005 13:34:52 +0000 Subject: in svn 15335 the tcp analysis was changed to do its stuff and to populate (prepend to) COL_INFO before callking the subdissectors instead of calling the tcp analysis (and prepend colingo) eitehr after the subdissector returned normally or if an exception caused by a subdissector was rised. this as a sideffect caused tcp analysis data to be overwritten if the subdissector caused any output to the info column. (and made tcp analysis suboptimal) this change adds a new function col_prepend_fence_fstr() that will prepend the info column with the string and also, if there was no fence already defined, create a fence and set it after the prepended col info text. This way, even if the subdissectors generate and rewrite col info, the tcp analysis data will still be displayed on the info column. svn path=/trunk/; revision=16116 --- epan/column-utils.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'epan/column-utils.h') diff --git a/epan/column-utils.h b/epan/column-utils.h index f5dda5c560..c80706084d 100644 --- a/epan/column-utils.h +++ b/epan/column-utils.h @@ -168,6 +168,17 @@ extern void col_append_fstr(column_info *cinfo, gint col, const gchar *format, . extern void col_prepend_fstr(column_info *cinfo, gint col, const gchar *format, ...) GNUC_FORMAT_CHECK(printf, 3, 4); +/**Prepend the given text to a column element, the text will be formatted and copied. + * This function is similar to col_prepend_fstr() but this function will + * unconditionally set a fence to the end of the prepended data even if there + * were no fence before. + * The col_prepend_fstr() will only prepend the data before the fence IFF + * there is already a fence created. This function will create a fence in case + * it does not yet exist. + */ +extern void col_prepend_fence_fstr(column_info *cinfo, gint col, const gchar *format, ...) + GNUC_FORMAT_CHECK(printf, 3, 4); + /** Append the given text (prepended by a separator) to a column element. * * Much like col_append_str() but will prepend the given separator if the column isn't empty. -- cgit v1.2.1