diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-03-18 16:58:15 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-03-18 23:58:54 +0000 |
commit | 096e5231ff41eb1b7c9c13fa1c6217fa78d73c6b (patch) | |
tree | 32c20cb47bb1c6320ac32431bfa0f2abb4807604 /ui/gtk/prefs_capture.c | |
parent | 9762c32709b2d2ed6f8d99b89c550c60a546fad9 (diff) | |
download | wireshark-096e5231ff41eb1b7c9c13fa1c6217fa78d73c6b.tar.gz |
Fix parsing of interface properties strings.
The first entry in the list does not have a leading comma, so a strstr()
for ",{ifname}(" will not work. Instead, use g_strsplit() with a comma
for all of the preferences.
Have common code for all the "uncomplicated" preferences. Have a
specialized handler for the one "complicated" preference.
Change-Id: I2144a98ab0cb70db56eaaba88175d6e03885de2a
Reviewed-on: https://code.wireshark.org/review/7741
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/gtk/prefs_capture.c')
-rw-r--r-- | ui/gtk/prefs_capture.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ui/gtk/prefs_capture.c b/ui/gtk/prefs_capture.c index a4227feb23..368e5021b8 100644 --- a/ui/gtk/prefs_capture.c +++ b/ui/gtk/prefs_capture.c @@ -1654,9 +1654,7 @@ ifopts_options_add(GtkListStore *list_store, if_info_t *if_info) } #endif - snaplen = capture_dev_user_snaplen_find(if_info->name); - hassnap = capture_dev_user_hassnap_find(if_info->name); - if (!hassnap || hassnap == -1) { + if (!capture_dev_user_snaplen_find(if_info->name, &hassnap, &snaplen)) { snaplen = WTAP_MAX_PACKET_SIZE; hassnap = FALSE; } |