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/qt/capture_interfaces_dialog.cpp | |
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/qt/capture_interfaces_dialog.cpp')
-rw-r--r-- | ui/qt/capture_interfaces_dialog.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ui/qt/capture_interfaces_dialog.cpp b/ui/qt/capture_interfaces_dialog.cpp index 2e2009bb0c..89aceee1e3 100644 --- a/ui/qt/capture_interfaces_dialog.cpp +++ b/ui/qt/capture_interfaces_dialog.cpp @@ -503,9 +503,7 @@ void CaptureInterfacesDialog::updateInterfaces() if (pmode != -1) { device->pmode = pmode; } - hassnap = capture_dev_user_hassnap_find(device->name); - snaplen = capture_dev_user_snaplen_find(device->name); - if(snaplen != -1 && hassnap != -1) { + if (capture_dev_user_snaplen_find(device->name, &hassnap, &snaplen)) { /* Default snap length set in preferences */ device->snaplen = snaplen; device->has_snaplen = hassnap; |