diff options
author | Anders Broman <anders.broman@ericsson.com> | 2009-07-23 05:48:39 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2009-07-23 05:48:39 +0000 |
commit | ded297677f07b1f80b20fb8a44d39e46845db01c (patch) | |
tree | 62dbbcbdf406866a7a96495dadd9b91fa6cf19f8 /epan/column.c | |
parent | 1e7878b53d433cbb5390cea41656d9c199494164 (diff) | |
download | wireshark-ded297677f07b1f80b20fb8a44d39e46845db01c.tar.gz wireshark-ded297677f07b1f80b20fb8a44d39e46845db01c.tar.bz2 wireshark-ded297677f07b1f80b20fb8a44d39e46845db01c.zip |
From Kovarththanan Rajaratnam:
Precompile custom columns filters.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3767
svn path=/trunk/; revision=29174
Diffstat (limited to 'epan/column.c')
-rw-r--r-- | epan/column.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/column.c b/epan/column.c index 93ddd86edf..30812f3268 100644 --- a/epan/column.c +++ b/epan/column.c @@ -668,8 +668,15 @@ build_column_format_array(column_info *cinfo, gboolean reset_fences) cinfo->col_title[i] = g_strdup(get_column_title(i)); if (cinfo->col_fmt[i] == COL_CUSTOM) { cinfo->col_custom_field[i] = g_strdup(get_column_custom_field(i)); + if(!dfilter_compile(cinfo->col_custom_field[i], &cinfo->col_custom_dfilter[i])) { + /* XXX: Should we issue a warning? */ + g_free(cinfo->col_custom_field[i]); + cinfo->col_custom_field[i] = NULL; + cinfo->col_custom_dfilter[i] = NULL; + } } else { cinfo->col_custom_field[i] = NULL; + cinfo->col_custom_dfilter[i] = NULL; } cinfo->fmt_matx[i] = (gboolean *) g_malloc0(sizeof(gboolean) * NUM_COL_FMTS); |