summaryrefslogtreecommitdiff
path: root/ui/qt/follow_stream_dialog.cpp
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-01-03 09:54:57 -0500
committerMichael Mann <mmann78@netscape.net>2016-01-04 01:26:22 +0000
commitc6dee1548992ced230b997b13890f2a1a7900331 (patch)
tree6bcbfab6f56afa05dc1dd892729947c1c504dd36 /ui/qt/follow_stream_dialog.cpp
parent72b18899a057e5ebf47575bbf66027e86a0546bc (diff)
downloadwireshark-c6dee1548992ced230b997b13890f2a1a7900331.tar.gz
Bugfix some issues with Follow HTTP Qt dialog
1. Populate packet number on follow HTTP handler. 2. Remove stream navigation (until its a little less buggy). This follows the convention of SSL which runs on top of a stream protocol (TCP), it's not a stream itself, which seems to be why its buggy. Change-Id: Idf21be2a00a8fde0fbf16f40ca8c36a2a44b8993 Reviewed-on: https://code.wireshark.org/review/13027 Reviewed-by: David Morsberger <dave@morsberger.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'ui/qt/follow_stream_dialog.cpp')
-rw-r--r--ui/qt/follow_stream_dialog.cpp39
1 files changed, 34 insertions, 5 deletions
diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp
index f627381545..91933c5893 100644
--- a/ui/qt/follow_stream_dialog.cpp
+++ b/ui/qt/follow_stream_dialog.cpp
@@ -294,7 +294,17 @@ void FollowStreamDialog::on_streamNumberSpinBox_valueChanged(int stream_num)
if (file_closed_) return;
if (stream_num >= 0) {
- follow_index((follow_type_ == FOLLOW_TCP) ? TCP_STREAM : UDP_STREAM, stream_num);
+ switch(follow_type_)
+ {
+ case FOLLOW_TCP:
+ case FOLLOW_SSL:
+ case FOLLOW_HTTP:
+ follow_index(TCP_STREAM, stream_num);
+ break;
+ case FOLLOW_UDP:
+ follow_index(UDP_STREAM, stream_num);
+ break;
+ }
follow(QString(), true);
}
}
@@ -482,6 +492,7 @@ http_queue_packet_data(void *tapdata, packet_info *pinfo,
follow_record->data = g_byte_array_append(follow_record->data,
tvb_get_ptr(next_tvb, 0, -1),
tvb_captured_length(next_tvb));
+ follow_record->packet_num = pinfo->fd->num;
if (follow_info->client_port == 0) {
follow_info->client_port = pinfo->srcport;
@@ -980,6 +991,7 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_stream_index)
}
break;
case FOLLOW_HTTP:
+ removeStreamControls();
if (!is_http) {
QMessageBox::warning(this, tr("Error following stream."), tr("Please make sure you have a HTTP packet selected."));
return false;
@@ -987,18 +999,35 @@ bool FollowStreamDialog::follow(QString previous_filter, bool use_stream_index)
break;
}
- if (follow_type_ == FOLLOW_TCP || follow_type_ == FOLLOW_SSL)
+ switch (follow_type_)
{
+ case FOLLOW_TCP:
+ case FOLLOW_SSL:
+ case FOLLOW_HTTP:
/* Create a new filter that matches all packets in the TCP stream,
and set the display filter entry accordingly */
reset_tcp_reassembly();
- } else {
+ break;
+ case FOLLOW_UDP:
reset_udp_follow();
+ break;
}
if (use_stream_index) {
- follow_filter = gchar_free_to_qstring(
- build_follow_index_filter((follow_type_ == FOLLOW_TCP) ? TCP_STREAM : UDP_STREAM));
+ switch(follow_type_)
+ {
+ case FOLLOW_TCP:
+ case FOLLOW_SSL:
+ follow_filter = gchar_free_to_qstring(build_follow_index_filter(TCP_STREAM));
+ break;
+ case FOLLOW_HTTP:
+ follow_filter = gchar_free_to_qstring(build_follow_index_filter(TCP_STREAM));
+ follow_filter = QString("((%1) && (http))").arg(follow_filter);
+ break;
+ case FOLLOW_UDP:
+ follow_filter = gchar_free_to_qstring(build_follow_index_filter(UDP_STREAM));
+ break;
+ }
} else {
if (follow_type_ == FOLLOW_HTTP) {
follow_filter = gchar_free_to_qstring(build_follow_conv_filter(&cap_file_.capFile()->edt->pi, "http"));