From 9671494643c68203da5fcf777a3c61720d29000a Mon Sep 17 00:00:00 2001 From: piaip Date: Tue, 13 May 2008 08:00:07 +0000 Subject: WARNING: THIS PATCHSET CHANGED SHM STRUCTURE. PLEASE READ UPDATING CAREFULLY. - (internal) change IP/from sorting mechanism. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4307 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- util/shmctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util') diff --git a/util/shmctl.c b/util/shmctl.c index 4e8c0ef1..4a1a2a4c 100644 --- a/util/shmctl.c +++ b/util/shmctl.c @@ -280,7 +280,8 @@ cmputmpidle(const void * i, const void * j) static int cmputmpfrom(const void * i, const void * j) { - return strncmp(SHM->uinfo[*(int*)i].from, SHM->uinfo[*(int*)j].from, sizeof(SHM->uinfo[0].from)); + // desc sorted + return -(SHM->uinfo[*(int*)i].from_ip - SHM->uinfo[*(int*)j].from_ip); } static int -- cgit v1.2.3