diff --git a/retroshare-gui/src/gui/statistics/TurtleRouterDialog.cpp b/retroshare-gui/src/gui/statistics/TurtleRouterDialog.cpp index c31995f61..ebb03eda2 100644 --- a/retroshare-gui/src/gui/statistics/TurtleRouterDialog.cpp +++ b/retroshare-gui/src/gui/statistics/TurtleRouterDialog.cpp @@ -5,6 +5,7 @@ #include "TurtleRouterDialog.h" #include #include +#include // for sort #include "gui/settings/rsharesettings.h" @@ -70,6 +71,10 @@ void TurtleRouterDialog::processSettings(bool bLoad) } +bool sr_Compare( TurtleRequestDisplayInfo m1, TurtleRequestDisplayInfo m2) +{ + return m1.age < m2.age; +} void TurtleRouterDialog::updateDisplay() { @@ -79,7 +84,9 @@ void TurtleRouterDialog::updateDisplay() std::vector tunnel_reqs_info ; rsTurtle->getInfo(hashes_info,tunnels_info,search_reqs_info,tunnel_reqs_info) ; - + + std::sort(search_reqs_info.begin(),search_reqs_info.end(),sr_Compare) ; + updateTunnelRequests(hashes_info,tunnels_info,search_reqs_info,tunnel_reqs_info) ; } @@ -162,8 +169,8 @@ void TurtleRouterDialog::updateTunnelRequests( const std::vector