aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-04-09 19:03:04 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-04-09 19:03:04 +0000
commit41e10f6bf2e7747b3eac67e6409a1ac0083aba83 (patch)
tree46191d9d9985af7733a3d82c71aa605d1ec453c8
parent8f2ce2f3080c6adb4006704908303fcaba2fb566 (diff)
From Jakub Zawadzki via bug 5809:
Compare frame number when columns are equal. svn path=/trunk/; revision=36532
-rw-r--r--gtk/packet_list_store.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/gtk/packet_list_store.c b/gtk/packet_list_store.c
index 20a9a2229f..e1204b5699 100644
--- a/gtk/packet_list_store.c
+++ b/gtk/packet_list_store.c
@@ -971,12 +971,9 @@ packet_list_compare_custom(gint sort_id, PacketListRecord *a, PacketListRecord *
}
static gint
-packet_list_compare_records(gint sort_id, PacketListRecord *a,
+_packet_list_compare_records(gint sort_id, PacketListRecord *a,
PacketListRecord *b)
{
- if (col_based_on_frame_data(&cfile.cinfo, sort_id))
- return frame_data_compare(a->fdata, b->fdata, cfile.cinfo.col_fmt[sort_id]);
-
g_assert(a->fdata->col_text);
g_assert(b->fdata->col_text);
g_assert(a->fdata->col_text[sort_id]);
@@ -992,6 +989,21 @@ packet_list_compare_records(gint sort_id, PacketListRecord *a,
}
static gint
+packet_list_compare_records(gint sort_id, PacketListRecord *a,
+ PacketListRecord *b)
+{
+ gint ret;
+
+ if (col_based_on_frame_data(&cfile.cinfo, sort_id))
+ return frame_data_compare(a->fdata, b->fdata, cfile.cinfo.col_fmt[sort_id]);
+
+ ret = _packet_list_compare_records(sort_id, a, b);
+ if (ret == 0)
+ ret = a->fdata->num - b->fdata->num;
+ return ret;
+}
+
+static gint
packet_list_qsort_physical_compare_func(PacketListRecord **a, PacketListRecord **b,
PacketList *packet_list)
{