diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-08-04 16:37:48 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-08-04 23:38:13 +0000 |
commit | bbda3dd7c1998b98202af8b24de415412298db86 (patch) | |
tree | 59082faf756fcca12f040a94664edb8e9f865c4b /ui/gtk/decode_as_dlg.c | |
parent | ce7b041305330e2cb87d895f57381241702c9d85 (diff) |
Write out decode_as entries from the actual dissector tables.
Have a save_decode_as_entries() routine in ui/decode_as_utils.c, that
does all the work of saving the entries by iterating through all the
changed entries with dissector_all_tables_foreach_changed().
When doing so, write out the selector for integral values in decimal, as
older versions of Wireshark only handled decimal values, and some of
those older versions are EOLed and won't be fixed.
Change-Id: I2dab461604524b98e3515867839a4b86c86c5d7b
Reviewed-on: https://code.wireshark.org/review/3426
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk/decode_as_dlg.c')
-rw-r--r-- | ui/gtk/decode_as_dlg.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/ui/gtk/decode_as_dlg.c b/ui/gtk/decode_as_dlg.c index ec2b2e5dec..1c012a9258 100644 --- a/ui/gtk/decode_as_dlg.c +++ b/ui/gtk/decode_as_dlg.c @@ -152,20 +152,6 @@ typedef struct da_entry da_entry_t; GSList *da_entries = NULL; /* - * Save entries into preferences. - */ -static void -write_da_entry(gpointer item, gpointer user_data) -{ - da_entry_t *entry = (da_entry_t *)item; - FILE *daf = (FILE *)user_data; - gchar *selector_str = g_strdup_printf("%d", entry->selector); - - decode_as_write_entry(daf, entry->table, selector_str, entry->initial, entry->current); - g_free(selector_str); -} - -/* * Free memory used by the da_entry */ static void @@ -454,13 +440,7 @@ decode_show_destroy_cb (GtkWidget *win _U_, gpointer user_data _U_) static void decode_show_save_cb (GtkWidget *win _U_, gpointer user_data _U_) { - FILE *daf = decode_as_open(); - - if (!daf) return; - - g_slist_foreach(da_entries, write_da_entry, daf); - - fclose(daf); + save_decode_as_entries(); } /* add a single binding to the Show list */ |