Export captured packets correctly.

Make sure we set and unset the "process_filtered" field of our range in
PacketRangeGroupBox. Otherwise we only export displayed packets. Make
sure we set "remove_ignored" as well.

Ignore the cf_cb_file_export_specified_packets_* callbacks in
CaptureFile so that we don't print spurious warnings.

Bug: 11473
Bug: 11428
Change-Id: Ica551addd3af2de79f7cd47a2cc361043d2982e5
Reviewed-on: https://code.wireshark.org/review/10477
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2015-09-10 17:31:19 -07:00
parent b55ae49ba1
commit 12176f45d9
3 changed files with 22 additions and 2 deletions

View File

@ -229,6 +229,13 @@ void CaptureFile::captureFileEvent(int event, gpointer data)
emit captureFileSaveStopped();
break;
case cf_cb_file_export_specified_packets_started:
case cf_cb_file_export_specified_packets_finished:
case cf_cb_file_export_specified_packets_failed:
case cf_cb_file_export_specified_packets_stopped:
// Ignored for now
break;
default:
g_log(NULL, G_LOG_LEVEL_DEBUG, "FIX: main_cf_callback %d %p", event, data);
g_warning("CaptureFile::captureFileCallback: event %u unknown", event);

View File

@ -322,10 +322,22 @@ void PacketRangeGroupBox::on_rangeButton_toggled(bool checked)
void PacketRangeGroupBox::on_capturedButton_toggled(bool checked)
{
if (checked) updateCounts();
if (checked) {
if (range_) range_->process_filtered = FALSE;
updateCounts();
}
}
void PacketRangeGroupBox::on_displayedButton_toggled(bool checked)
{
if (checked) updateCounts();
if (checked) {
if (range_) range_->process_filtered = TRUE;
updateCounts();
}
}
void PacketRangeGroupBox::on_ignoredCheckBox_toggled(bool checked)
{
if (range_) range_->remove_ignored = checked ? TRUE : FALSE;
updateCounts();
}

View File

@ -72,6 +72,7 @@ private slots:
void on_capturedButton_toggled(bool checked);
void on_displayedButton_toggled(bool checked);
void on_ignoredCheckBox_toggled(bool checked);
};
#endif // PACKET_RANGE_GROUP_BOX_H