Bugfix VoipCallsDialog tap handling

voip's special tap unregistering should be happening when
WiresharkDialog unregisters its taps.

Change-Id: I8f28b1ed31617b47870cb7a429d43f52fb8c4a86
Reviewed-on: https://code.wireshark.org/review/25294
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Michael Mann 2018-01-14 15:37:16 -05:00 committed by Anders Broman
parent 2f31016e6c
commit 56a991710b
4 changed files with 10 additions and 7 deletions

View File

@ -126,10 +126,10 @@ VoipCallsDialog::~VoipCallsDialog()
g_queue_free(tapinfo_.callsinfos);
}
void VoipCallsDialog::endRetapPackets()
void VoipCallsDialog::removeTapListeners()
{
voip_calls_remove_all_tap_listeners(&tapinfo_);
WiresharkDialog::endRetapPackets();
WiresharkDialog::removeTapListeners();
}
void VoipCallsDialog::captureFileClosing()

View File

@ -52,9 +52,6 @@ public:
explicit VoipCallsDialog(QWidget &parent, CaptureFile &cf, bool all_flows = false);
~VoipCallsDialog();
public slots:
void endRetapPackets();
signals:
void updateFilter(QString filter, bool force = false);
void captureFileChanged(capture_file *cf);
@ -62,6 +59,7 @@ signals:
protected:
void contextMenuEvent(QContextMenuEvent *event);
virtual void removeTapListeners();
protected slots:
void changeEvent(QEvent* event);

View File

@ -163,6 +163,11 @@ void WiresharkDialog::captureEvent(CaptureEvent *e)
}
void WiresharkDialog::beginRetapPackets()
{
retap_depth_++;
}
void WiresharkDialog::endRetapPackets()
{
retap_depth_--;

View File

@ -59,7 +59,7 @@ public:
* accessed after tapping is finished.
*/
void beginRetapPackets() { retap_depth_++; }
void beginRetapPackets();
/**
* @brief Mark the end of a code block that retaps packets. If the user
* has closed the dialog it will be desroyed at this point.
@ -111,7 +111,7 @@ protected:
/**
* @brief Remove all tap listeners registered via registerTapListener.
*/
void removeTapListeners();
virtual void removeTapListeners();
/**
* @brief true if the file has been closed, false otherwise.