comparison mod_statistics/top.lua @ 1073:fe57e9332e52

mod_statistics/top.lua: Fix session sorting function (seems it must always return false when a==b)
author Matthew Wild <mwild1@gmail.com>
date Sat, 15 Jun 2013 20:16:58 +0100
parents 4dbdb1b465e8
children 5f398922f0a3
comparison
equal deleted inserted replaced
1072:4dbdb1b465e8 1073:fe57e9332e52
107 self.listwin:attroff(curses.A_REVERSE); 107 self.listwin:attroff(curses.A_REVERSE);
108 end 108 end
109 109
110 local function session_compare(session1, session2) 110 local function session_compare(session1, session2)
111 local stats1, stats2 = session1.stats, session2.stats; 111 local stats1, stats2 = session1.stats, session2.stats;
112 return (stats1.total_stanzas_in + stats1.total_stanzas_out) >= 112 return (stats1.total_stanzas_in + stats1.total_stanzas_out) >
113 (stats2.total_stanzas_in + stats2.total_stanzas_out); 113 (stats2.total_stanzas_in + stats2.total_stanzas_out);
114 end 114 end
115 115
116 function top:draw_conn_list() 116 function top:draw_conn_list()
117 local rows = curses.lines()-(#status_lines+2)-5; 117 local rows = curses.lines()-(#status_lines+2)-5;