Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Crash in capture dialog, monitor changed callback (bug 10685)

From: Peter Wu <peter@xxxxxxxxxxxxx>
Date: Fri, 28 Nov 2014 17:13:24 +0100
Hi,

I came across a duplicated piece of code by grepping for the string "DLT
n" which I originally found in ui/gtk/capture_dlg.c. Two questions:

 - Can somebody reduce the duplication (two occurrences in
   ui/gtk/capture_dlg.c, one in ui/qt/manage_interfaces_dialog.cpp)?
 - Why is the callback for capture_prep_monitor_changed_cb so huge?

There is a crash in certain circumstances, and
capture_prep_monitor_changed_cb is involved:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10685

cc'ing Michael Tüxen as he extended capture_prep_monitor_changed_cb in
commit eaffdfeaaa572bb818f116afb3c63b3d43c153ea
Date:   Fri Aug 5 07:19:17 2011 +0000

    Add support for multiple interfaces to the capture options dialog.
    Obtained from Irene Ruengeler.
-- 
Kind regards,
Peter
https://lekensteyn.nl