Wireshark mailing list archives

Re: What is the use of pointer "cap_file_" in QtShark


From: Gerald Combs <gerald () wireshark org>
Date: Wed, 22 May 2013 11:53:07 -0700

On 5/22/13 10:21 AM, Richard Turner wrote:
In Wireshark/ui/qt/main_window.h there is a private member variable
defined as:

capture_file *cap_file_;

I think it's a pointer to the global variable "cfile" (defined in
tshark.c).

Is it true that we keep this pointer only to verify the validity of
cfile (we set cap_file_ to NULL when the capture file is closed)?

The intent was to associate a capture_file with a MainWindow instead of
with the entire application. I've been trying to avoid the use of
globals.h and the global cfile variable in particular in the Qt code in
case we ever manage to support having more than one capture file open.
Using it to determine if we have an open capture file followed from that.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: