forked from osmocom/wireshark
prefs: Don't remove unknown coloring rules.
When saving the colorfilters file, keep and disable unknown coloring rules instead of removing them. The user may want to correct the syntax. Change-Id: Ib27612a0601276b6ebbb467d7d253f3f72103d1c Reviewed-on: https://code.wireshark.org/review/29908 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
parent
e804e63d4d
commit
b0dd361d48
|
@ -410,12 +410,12 @@ color_filter_validate_cb(gpointer filter_arg, gpointer err)
|
|||
if (colorf->disabled) return;
|
||||
|
||||
if (!dfilter_compile(colorf->filter_text, &colorf->c_colorfilter, &local_err_msg)) {
|
||||
*err_msg = g_strdup_printf("Removing color filter name: \"%s\" text: \"%s\".\n%s",
|
||||
*err_msg = g_strdup_printf("Disabling color filter name: \"%s\" filter: \"%s\".\n%s",
|
||||
colorf->filter_name, colorf->filter_text, local_err_msg);
|
||||
g_free(local_err_msg);
|
||||
/* Delete the color filter from the list of color filters. */
|
||||
color_filter_valid_list = g_slist_remove(color_filter_valid_list, colorf);
|
||||
color_filter_delete(colorf);
|
||||
|
||||
/* Disable the color filter in the list of color filters. */
|
||||
colorf->disabled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue