diff options
author | Gerald Combs <gerald@wireshark.org> | 2015-07-07 12:04:48 -0700 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2015-07-07 23:17:51 +0000 |
commit | e93fa8a82dffd12d03d0ac4d8a71d83cf75f1eaa (patch) | |
tree | a6f44c1f4e385f70feb2a90d3b0992dfa922d08b /ui | |
parent | 5ccd8afe9f3eb0956cd7dce994a677a8cfc9f4bf (diff) |
Add ResponseTimeDelayDialog.
Change-Id: Ie1ea316643a3465763aec71f4a3ef4bf1a5ae639
Reviewed-on: https://code.wireshark.org/review/9548
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/cli/tap-rtd.c | 2 | ||||
-rw-r--r-- | ui/cli/tap-simple_stattable.c | 2 | ||||
-rw-r--r-- | ui/gtk/response_time_delay_table.c | 4 | ||||
-rw-r--r-- | ui/qt/CMakeLists.txt | 2 | ||||
-rw-r--r-- | ui/qt/Makefile.common | 2 | ||||
-rw-r--r-- | ui/qt/Wireshark.pro | 2 | ||||
-rw-r--r-- | ui/qt/response_time_delay_dialog.cpp | 286 | ||||
-rw-r--r-- | ui/qt/response_time_delay_dialog.h | 64 | ||||
-rw-r--r-- | ui/qt/service_response_time_dialog.cpp | 26 | ||||
-rw-r--r-- | ui/qt/service_response_time_dialog.h | 13 | ||||
-rw-r--r-- | ui/qt/tap_parameter_dialog.cpp | 5 |
11 files changed, 377 insertions, 31 deletions
diff --git a/ui/cli/tap-rtd.c b/ui/cli/tap-rtd.c index a939817431..2e43286b62 100644 --- a/ui/cli/tap-rtd.c +++ b/ui/cli/tap-rtd.c @@ -115,7 +115,7 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter) error_string = register_tap_listener(get_rtd_tap_listener_name(rtd), &ui->rtd, filter, 0, NULL, get_rtd_packet_func(rtd), rtd_draw); if (error_string) { - free_rtd_table(rtd, &ui->rtd.stat_table, NULL, NULL); + free_rtd_table(&ui->rtd.stat_table, NULL, NULL); fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string->str); g_string_free(error_string, TRUE); exit(1); diff --git a/ui/cli/tap-simple_stattable.c b/ui/cli/tap-simple_stattable.c index 29ffc73880..08edce0427 100644 --- a/ui/cli/tap-simple_stattable.c +++ b/ui/cli/tap-simple_stattable.c @@ -115,7 +115,7 @@ init_stat_table(new_stat_tap_ui *new_stat_tap, const char *filter) error_string = register_tap_listener(new_stat_tap->tap_name, &ui->stats, filter, 0, NULL, new_stat_tap->packet_func, simple_draw); if (error_string) { -/* free_rtd_table(rtd, &ui->rtd.stat_table, NULL, NULL); */ +/* free_rtd_table(&ui->rtd.stat_table, NULL, NULL); */ fprintf(stderr, "tshark: Couldn't register tap: %s\n", error_string->str); g_string_free(error_string, TRUE); exit(1); diff --git a/ui/gtk/response_time_delay_table.c b/ui/gtk/response_time_delay_table.c index 7085d39ff9..26dc47d9f8 100644 --- a/ui/gtk/response_time_delay_table.c +++ b/ui/gtk/response_time_delay_table.c @@ -116,7 +116,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) remove_tap_listener(&rr->data); - free_rtd_table(rr->rtd, &rr->data.stat_table, NULL, NULL); + free_rtd_table(&rr->data.stat_table, NULL, NULL); g_free(rr); } @@ -306,7 +306,7 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter) if(error_string){ simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str); g_string_free(error_string, TRUE); - free_rtd_table(rr->rtd, &rr->data.stat_table, NULL, NULL); + free_rtd_table(&rr->data.stat_table, NULL, NULL); g_free(rr); return; } diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt index bb64a01df4..8dedded530 100644 --- a/ui/qt/CMakeLists.txt +++ b/ui/qt/CMakeLists.txt @@ -97,6 +97,7 @@ set(WIRESHARK_QT_HEADERS qcustomplot.h recent_file_status.h related_packet_delegate.h + response_time_delay_dialog.h rtp_stream_dialog.h sctp_all_assocs_dialog.h sctp_assoc_analyse_dialog.h @@ -220,6 +221,7 @@ set(WIRESHARK_QT_SRC qt_ui_utils.cpp recent_file_status.cpp related_packet_delegate.cpp + response_time_delay_dialog.cpp rtp_stream_dialog.cpp sctp_all_assocs_dialog.cpp sctp_assoc_analyse_dialog.cpp diff --git a/ui/qt/Makefile.common b/ui/qt/Makefile.common index 1e89b4c94b..531fb3c6c0 100644 --- a/ui/qt/Makefile.common +++ b/ui/qt/Makefile.common @@ -206,6 +206,7 @@ MOC_HDRS = \ related_packet_delegate.h \ remote_capture_dialog.h \ remote_settings_dialog.h \ + response_time_delay_dialog.h \ search_frame.h \ rtp_stream_dialog.h \ sctp_all_assocs_dialog.h \ @@ -433,6 +434,7 @@ WIRESHARK_QT_SRC = \ related_packet_delegate.cpp \ remote_capture_dialog.cpp \ remote_settings_dialog.cpp \ + response_time_delay_dialog.cpp \ rtp_stream_dialog.cpp \ sctp_all_assocs_dialog.cpp \ sctp_assoc_analyse_dialog.cpp \ diff --git a/ui/qt/Wireshark.pro b/ui/qt/Wireshark.pro index 72140d221e..a1b049801e 100644 --- a/ui/qt/Wireshark.pro +++ b/ui/qt/Wireshark.pro @@ -613,6 +613,7 @@ HEADERS += \ qcustomplot.h \ recent_file_status.h \ related_packet_delegate.h \ + response_time_delay_dialog.h \ sequence_diagram.h \ sequence_dialog.h \ simple_dialog.h \ @@ -706,6 +707,7 @@ SOURCES += \ related_packet_delegate.cpp \ remote_capture_dialog.cpp \ remote_settings_dialog.cpp \ + response_time_delay_dialog.cpp \ rtp_stream_dialog.cpp \ sctp_all_assocs_dialog.cpp \ sctp_assoc_analyse_dialog.cpp \ diff --git a/ui/qt/response_time_delay_dialog.cpp b/ui/qt/response_time_delay_dialog.cpp new file mode 100644 index 0000000000..b9610fa4f3 --- /dev/null +++ b/ui/qt/response_time_delay_dialog.cpp @@ -0,0 +1,286 @@ +/* response_time_delay_dialog.cpp + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#include "response_time_delay_dialog.h" + +#include "file.h" + +#include "epan/proto.h" +#include "epan/rtd_table.h" + +#include <QMessageBox> +#include <QTreeWidget> + +#include "qt_ui_utils.h" +#include "wireshark_application.h" + +#include <QDebug> + +static QHash<const QString, register_rtd_t *> cfg_str_to_rtd_; + +extern "C" { +static void +rtd_init(const char *args, void*) { + QStringList args_l = QString(args).split(','); + if (args_l.length() > 1) { + QString rtd = QString("%1,%2").arg(args_l[0]).arg(args_l[1]); + QString filter; + if (args_l.length() > 2) { + filter = QStringList(args_l.mid(2)).join(","); + } + wsApp->emitTapParameterSignal(rtd, filter, NULL); + } +} +} + +void register_response_time_delay_tables(gpointer data, gpointer) +{ + register_rtd_t *rtd = (register_rtd_t*)data; + const char* short_name = proto_get_protocol_short_name(find_protocol_by_id(get_rtd_proto_id(rtd))); + const char *cfg_abbr = rtd_table_get_tap_string(rtd); + + cfg_str_to_rtd_[cfg_abbr] = rtd; + TapParameterDialog::registerDialog( + short_name, + cfg_abbr, + REGISTER_STAT_GROUP_RESPONSE_TIME, + rtd_init, + ResponseTimeDelayDialog::createRtdDialog); +} + +enum { + col_type_, + col_messages_, + col_min_srt_, + col_max_srt_, + col_avg_srt_, + col_min_frame_, + col_max_frame_, + col_open_requests, + col_discarded_reponses_, + col_repeated_requests_, + col_repeated_responses_ +}; + +QStringList header_names_ = QStringList() + << "Type" << "Messages" + << "Min SRT" << "Max SRT" << "Avg SRT" + << "Min in Frame" << "Max in Frame" + << "Open Requests" << "Discarded Responses" + << "Repeated Requests" << "Repeated Responses"; + +enum { + rtd_table_type_ = 1000, + rtd_time_stat_type_ +}; + +class RtdTimeStatTreeWidgetItem : public QTreeWidgetItem +{ +public: + RtdTimeStatTreeWidgetItem(QTreeWidget *parent, const QString type, const rtd_timestat *timestat) : + QTreeWidgetItem (parent, rtd_time_stat_type_), + type_(type), + timestat_(timestat) + { + setText(col_type_, type_); + setHidden(true); + } + void draw() { + setText(col_messages_, QString::number(timestat_->rtd->num)); + setText(col_min_srt_, QString::number(nstime_to_sec(×tat_->rtd->min), 'f', 6)); + setText(col_max_srt_, QString::number(nstime_to_sec(×tat_->rtd->max), 'f', 6)); + setText(col_avg_srt_, QString::number(get_average(×tat_->rtd->tot, timestat_->rtd->num) / 1000.0, 'f', 6)); + setText(col_min_frame_, QString::number(timestat_->rtd->min_num)); + setText(col_max_frame_, QString::number(timestat_->rtd->max_num)); + setText(col_open_requests, QString::number(timestat_->open_req_num)); + setText(col_discarded_reponses_, QString::number(timestat_->disc_rsp_num)); + setText(col_repeated_requests_, QString::number(timestat_->req_dup_num)); + setText(col_repeated_responses_, QString::number(timestat_->rsp_dup_num)); + + setHidden(timestat_->rtd->num < 1); + } + bool operator< (const QTreeWidgetItem &other) const + { + if (other.type() != rtd_time_stat_type_) return QTreeWidgetItem::operator< (other); + const RtdTimeStatTreeWidgetItem *other_row = static_cast<const RtdTimeStatTreeWidgetItem *>(&other); + + switch (treeWidget()->sortColumn()) { + case col_messages_: + return timestat_->rtd->num < other_row->timestat_->rtd->num; + case col_min_srt_: + return nstime_cmp(×tat_->rtd->min, &other_row->timestat_->rtd->min) < 0; + case col_max_srt_: + return nstime_cmp(×tat_->rtd->max, &other_row->timestat_->rtd->max) < 0; + case col_avg_srt_: + { + double our_avg = get_average(×tat_->rtd->tot, timestat_->rtd->num); + double other_avg = get_average(&other_row->timestat_->rtd->tot, other_row->timestat_->rtd->num); + return our_avg < other_avg; + } + case col_min_frame_: + return timestat_->rtd->min_num < other_row->timestat_->rtd->min_num; + case col_max_frame_: + return timestat_->rtd->max_num < other_row->timestat_->rtd->max_num; + case col_open_requests: + return timestat_->open_req_num < other_row->timestat_->open_req_num; + case col_discarded_reponses_: + return timestat_->disc_rsp_num < other_row->timestat_->disc_rsp_num; + case col_repeated_requests_: + return timestat_->req_dup_num < other_row->timestat_->req_dup_num; + case col_repeated_responses_: + return timestat_->rsp_dup_num < other_row->timestat_->rsp_dup_num; + default: + break; + } + + return QTreeWidgetItem::operator< (other); + } + QList<QVariant> rowData() { + return QList<QVariant>() << type_ << timestat_->rtd->num + << nstime_to_sec(×tat_->rtd->min) << nstime_to_sec(×tat_->rtd->max) + << get_average(×tat_->rtd->tot, timestat_->rtd->num) / 1000.0 + << timestat_->rtd->min_num << timestat_->rtd->max_num + << timestat_->open_req_num << timestat_->disc_rsp_num + << timestat_->req_dup_num << timestat_->rsp_dup_num; + } + +private: + const QString type_; + const rtd_timestat *timestat_; +}; + +ResponseTimeDelayDialog::ResponseTimeDelayDialog(QWidget &parent, CaptureFile &cf, register_rtd *rtd, const QString filter, int help_topic) : + TapParameterDialog(parent, cf, help_topic), + rtd_(rtd) +{ + QString subtitle = QString("%1 Response Time Delay Statistics") + .arg(proto_get_protocol_short_name(find_protocol_by_id(get_rtd_proto_id(rtd)))); + setWindowSubtitle(subtitle); + + statsTreeWidget()->setHeaderLabels(header_names_); + + for (int col = 0; col < statsTreeWidget()->columnCount(); col++) { + if (col == col_type_) continue; + statsTreeWidget()->headerItem()->setTextAlignment(col, Qt::AlignRight); + } + + setDisplayFilter(filter); + + if (!filter.isEmpty()) { + setDisplayFilter(filter); + } +} + +TapParameterDialog *ResponseTimeDelayDialog::createRtdDialog(QWidget &parent, const QString cfg_str, const QString filter, CaptureFile &cf) +{ + if (!cfg_str_to_rtd_.contains(cfg_str)) { + // XXX MessageBox? + return NULL; + } + + register_rtd_t *rtd = cfg_str_to_rtd_[cfg_str]; + + return new ResponseTimeDelayDialog(parent, cf, rtd, filter); +} + +void ResponseTimeDelayDialog::addRtdTable(const _rtd_stat_table *rtd_table) +{ + for (unsigned i = 0; i < rtd_table->num_rtds; i++) { + const QString type = val_to_qstring(i, get_rtd_value_string(rtd_), "Other (%d)"); + new RtdTimeStatTreeWidgetItem(statsTreeWidget(), type, &rtd_table->time_stats[i]); + } +} + +void ResponseTimeDelayDialog::tapReset(void *rtdd_ptr) +{ + rtd_data_t *rtdd = (rtd_data_t*) rtdd_ptr; + ResponseTimeDelayDialog *rtd_dlg = static_cast<ResponseTimeDelayDialog *>(rtdd->user_data); + if (!rtd_dlg) return; + + reset_rtd_table(&rtdd->stat_table, NULL, NULL); + rtd_dlg->statsTreeWidget()->clear(); + rtd_dlg->addRtdTable(&rtdd->stat_table); +} + +void ResponseTimeDelayDialog::tapDraw(void *rtdd_ptr) +{ + rtd_data_t *rtdd = (rtd_data_t*) rtdd_ptr; + ResponseTimeDelayDialog *rtd_dlg = static_cast<ResponseTimeDelayDialog *>(rtdd->user_data); + if (!rtd_dlg || !rtd_dlg->statsTreeWidget()) return; + + QTreeWidgetItemIterator it(rtd_dlg->statsTreeWidget()); + while (*it) { + if ((*it)->type() == rtd_time_stat_type_) { + RtdTimeStatTreeWidgetItem *rtd_ts_ti = static_cast<RtdTimeStatTreeWidgetItem *>((*it)); + rtd_ts_ti->draw(); + } + ++it; + } + + for (int i = 0; i < rtd_dlg->statsTreeWidget()->columnCount() - 1; i++) { + rtd_dlg->statsTreeWidget()->resizeColumnToContents(i); + } +} + +void ResponseTimeDelayDialog::fillTree() +{ + rtd_data_t rtd_data; + memset (&rtd_data, 0, sizeof(rtd_data)); + rtd_table_dissector_init(rtd_, &rtd_data.stat_table, NULL, NULL); + rtd_data.user_data = this; + + GString *error_string = register_tap_listener(get_rtd_tap_listener_name(rtd_), + &rtd_data, + displayFilter(), + 0, + tapReset, + get_rtd_packet_func(rtd_), + tapDraw); + if (error_string) { + QMessageBox::critical(this, tr("Failed to attach to tap \"%1\"").arg(get_rtd_tap_listener_name(rtd_)), + error_string->str); + g_string_free(error_string, TRUE); + free_rtd_table(&rtd_data.stat_table, NULL, NULL); + reject(); + } + + statsTreeWidget()->setSortingEnabled(false); + + cf_retap_packets(cap_file_.capFile()); + + tapDraw(&rtd_data); + + statsTreeWidget()->sortItems(col_type_, Qt::AscendingOrder); + statsTreeWidget()->setSortingEnabled(true); + + remove_tap_listener(&rtd_data); + free_rtd_table(&rtd_data.stat_table, NULL, NULL); +} + +QList<QVariant> ResponseTimeDelayDialog::treeItemData(QTreeWidgetItem *ti) const +{ + QList<QVariant> tid; + if (ti->type() == rtd_time_stat_type_) { + RtdTimeStatTreeWidgetItem *rtd_ts_ti = static_cast<RtdTimeStatTreeWidgetItem *>(ti); + tid << rtd_ts_ti->rowData(); + } + return tid; +} diff --git a/ui/qt/response_time_delay_dialog.h b/ui/qt/response_time_delay_dialog.h new file mode 100644 index 0000000000..38c52239ff --- /dev/null +++ b/ui/qt/response_time_delay_dialog.h @@ -0,0 +1,64 @@ +/* response_time_delay_dialog.h + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef __RESPONSE_TIME_DELAY_DIALOG_H__ +#define __RESPONSE_TIME_DELAY_DIALOG_H__ + +#include "tap_parameter_dialog.h" + +struct _rtd_stat_table; + +class ResponseTimeDelayDialog : public TapParameterDialog +{ + Q_OBJECT + +public: + ResponseTimeDelayDialog(QWidget &parent, CaptureFile &cf, struct register_rtd *rtd, const QString filter, int help_topic = 0); + static TapParameterDialog *createRtdDialog(QWidget &parent, const QString cfg_str, const QString filter, CaptureFile &cf); + +protected: + /** Add a response time delay table. + * + * @param rtd_table The table to add. + * @return A + */ + // gtk:service_response_table.h:init_srt_table + void addRtdTable(const struct _rtd_stat_table *rtd_table); + +private: + struct register_rtd *rtd_; + + // Callbacks for register_tap_listener + static void tapReset(void *rtdd_ptr); + static void tapDraw(void *rtdd_ptr); + + virtual void fillTree(); + virtual QList<QVariant> treeItemData(QTreeWidgetItem *ti) const; +}; + +/** Register function to register dissectors that support RTD. + * + * @param data register_rtd_t* representing dissetor RTD table + * @param user_data is unused + */ +void register_response_time_delay_tables(gpointer data, gpointer user_data); + +#endif // __RESPONSE_TIME_DELAY_DIALOG_H__ diff --git a/ui/qt/service_response_time_dialog.cpp b/ui/qt/service_response_time_dialog.cpp index 33f0323f70..17aba9be5e 100644 --- a/ui/qt/service_response_time_dialog.cpp +++ b/ui/qt/service_response_time_dialog.cpp @@ -23,7 +23,6 @@ #include "file.h" -#include <epan/timestats.h> #include <epan/tap.h> #include <ui/service_response_time.h> @@ -34,12 +33,9 @@ #include <QTreeWidget> #include <QTreeWidgetItemIterator> -// To do: - static QHash<const QString, register_srt_t *> cfg_str_to_srt_; extern "C" { -// XXX Need to handle filters. static void srt_init(const char *args, void*) { QStringList args_l = QString(args).split(','); @@ -96,11 +92,7 @@ public: setText(SRT_COLUMN_CALLS, QString::number(procedure_->stats.num)); setText(SRT_COLUMN_MIN, QString::number(nstime_to_sec(&procedure_->stats.min), 'f', 6)); setText(SRT_COLUMN_MAX, QString::number(nstime_to_sec(&procedure_->stats.max), 'f', 6)); - double avg_time = 0.0; - if (procedure_->stats.num) { - avg_time = nstime_to_sec(&procedure_->stats.min) / procedure_->stats.num; - } - setText(SRT_COLUMN_AVG, QString::number(avg_time, 'f', 6)); + setText(SRT_COLUMN_AVG, QString::number(get_average(&procedure_->stats.tot, procedure_->stats.num) / 1000.0, 'f', 6)); setText(SRT_COLUMN_SUM, QString::number(nstime_to_sec(&procedure_->stats.tot), 'f', 6)); for (int col = 0; col < columnCount(); col++) { @@ -127,8 +119,8 @@ public: return nstime_cmp(&procedure_->stats.max, &other_row->procedure_->stats.max) < 0; case SRT_COLUMN_AVG: { - double our_avg = nstime_to_msec(&procedure_->stats.tot) / procedure_->stats.num; - double other_avg = nstime_to_msec(&other_row->procedure_->stats.tot) / other_row->procedure_->stats.num; + double our_avg = get_average(&procedure_->stats.tot, procedure_->stats.num); + double other_avg = get_average(&other_row->procedure_->stats.tot, other_row->procedure_->stats.num); return our_avg < other_avg; } case SRT_COLUMN_SUM: @@ -140,13 +132,10 @@ public: return QTreeWidgetItem::operator< (other); } QList<QVariant> rowData() { - double avg_time = 0.0; - if (procedure_->stats.num) { - avg_time = nstime_to_sec(&procedure_->stats.min) / procedure_->stats.num; - } return QList<QVariant>() << QString(procedure_->procedure) << procedure_->index << procedure_->stats.num << nstime_to_sec(&procedure_->stats.min) << nstime_to_sec(&procedure_->stats.max) - << avg_time << nstime_to_sec(&procedure_->stats.tot); + << get_average(&procedure_->stats.tot, procedure_->stats.num) / 1000.0 + << nstime_to_sec(&procedure_->stats.tot); } private: const srt_procedure_t *procedure_; @@ -264,10 +253,9 @@ TapParameterDialog *ServiceResponseTimeDialog::createSrtDialog(QWidget &parent, return new ServiceResponseTimeDialog(parent, cf, srt, filter); } -QTreeWidgetItem *ServiceResponseTimeDialog::addSrtTable(const struct _srt_stat_table *srt_table) +void ServiceResponseTimeDialog::addSrtTable(const struct _srt_stat_table *srt_table) { - SrtTableTreeWidgetItem *srtt_ti = new SrtTableTreeWidgetItem(statsTreeWidget(), srt_table); - return srtt_ti; + new SrtTableTreeWidgetItem(statsTreeWidget(), srt_table); } void ServiceResponseTimeDialog::tapReset(void *srtd_ptr) diff --git a/ui/qt/service_response_time_dialog.h b/ui/qt/service_response_time_dialog.h index b7c7569bd3..39de1698b3 100644 --- a/ui/qt/service_response_time_dialog.h +++ b/ui/qt/service_response_time_dialog.h @@ -35,20 +35,19 @@ class ServiceResponseTimeDialog : public TapParameterDialog public: ServiceResponseTimeDialog(QWidget &parent, CaptureFile &cf, struct register_srt *srt, const QString filter, int help_topic = 0); - static TapParameterDialog *createSrtDialog(QWidget &parent, const QString cfg_str, const QString arg, CaptureFile &cf); + static TapParameterDialog *createSrtDialog(QWidget &parent, const QString cfg_str, const QString filter, CaptureFile &cf); protected: - /** Add service response time table. + /** Add a service response time table. * * In the GTK+ UI "tables" are separate, tabbed widgets. In the Qt UI they are * separate groups of QTreeWidgetItems. * - * @param title The table title (not shown if only one table). - * @param num_procs Number of procedures. - * @param filter_string filter string or QString(). + * @param srt_table The table to add. + * @return A */ // gtk:service_response_table.h:init_srt_table - QTreeWidgetItem *addSrtTable(const struct _srt_stat_table *srt_table); + void addSrtTable(const struct _srt_stat_table *srt_table); private: struct register_srt *srt_; @@ -65,7 +64,7 @@ private slots: void statsTreeWidgetItemChanged(); }; -/** Register function to register dissectors that support SRT for GTK. +/** Register function to register dissectors that support SRT. * * @param data register_srt_t* representing dissetor SRT table * @param user_data is unused diff --git a/ui/qt/tap_parameter_dialog.cpp b/ui/qt/tap_parameter_dialog.cpp index b5038d9a13..9bc6433c46 100644 --- a/ui/qt/tap_parameter_dialog.cpp +++ b/ui/qt/tap_parameter_dialog.cpp @@ -294,7 +294,10 @@ QByteArray TapParameterDialog::getTreeAsString(st_format_type format) // Data while (*it) { QList<QVariant> tid = treeItemData((*it)); - if (tid.length() < 1) continue; + if (tid.length() < 1) { + ++it; + continue; + } if (tid.length() < ui->statsTreeWidget->columnCount()) { // Assume we have a header |