aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/sctp_graph_arwnd_dialog.cpp5
-rw-r--r--ui/qt/sctp_graph_arwnd_dialog.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/ui/qt/sctp_graph_arwnd_dialog.cpp b/ui/qt/sctp_graph_arwnd_dialog.cpp
index 1347a543fc..18a6d35b2f 100644
--- a/ui/qt/sctp_graph_arwnd_dialog.cpp
+++ b/ui/qt/sctp_graph_arwnd_dialog.cpp
@@ -72,6 +72,8 @@ void SCTPGraphArwndDialog::drawArwndGraph()
listSACK = g_list_last(selected_assoc->sack2);
startArwnd = selected_assoc->arwnd1;
}
+ bool detect_max_arwnd = (startArwnd == 0) ? true : false;
+
while (listSACK) {
tsn = (tsn_t*) (listSACK->data);
tlist = g_list_first(tsn->tsns);
@@ -84,6 +86,9 @@ void SCTPGraphArwndDialog::drawArwndGraph()
nr_sack_header =(struct nr_sack_chunk_header *)tlist->data;
arwnd = g_ntohl(nr_sack_header->a_rwnd);
}
+ if (detect_max_arwnd && startArwnd < arwnd) {
+ startArwnd = arwnd;
+ }
ya.append(arwnd);
xa.append(tsn->secs + tsn->usecs/1000000.0);
fa.append(tsn->frame_number);
diff --git a/ui/qt/sctp_graph_arwnd_dialog.h b/ui/qt/sctp_graph_arwnd_dialog.h
index 7edf13e589..c682014f4b 100644
--- a/ui/qt/sctp_graph_arwnd_dialog.h
+++ b/ui/qt/sctp_graph_arwnd_dialog.h
@@ -49,7 +49,7 @@ private:
capture_file *cap_file_;
int frame_num;
int direction;
- int startArwnd;
+ guint32 startArwnd;
QVector<double> xa, ya;
QVector<guint32> fa;
// QVector<QString> typeStrings;