It's not mis-sorted until I say it is!  :-)

cmpHostsFctn is the sort function called by the quicksort.

If you've studied some CS, then you'll understand that quicksorts are
sensitive to their pivot points.  If you have an unstable compare function
(i.e. one where a>b and b>c but a !> c) you'll toast the sort.  (I've posted
on this extensively in the past).

So my suspicion is that there are some NULLs in your tables, and since the
function isn't coded to handle them, it's unstable.

But the changes I had you make should - if you're running w/ trace level 4+
(required for CONST_TRACE_NOISY) and with the -L option - log enough data to
see the actual compares.  I posted some sample output in that message too.

Until you find the log messages, there's nothing else to do...

Get to work bucko :(

-----Burton



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ralf
> Stodt
> Sent: Thursday, May 20, 2004 3:11 PM
> To: [EMAIL PROTECTED]
> Subject: [Ntop] Re: sorting problems
>
>
> Hi Again !
>
> Burton M. Strauss III wrote:
> > grep -c ntop * | grep -v :0
>
> Exactly what I've done. Maybe i messed up the changes in reportUtils.c
> (we're talking of line 1647 an following ?) and ntop doesn't create
> these logs.
> Anyway: The sorting function cmpHostsFctn we're talking about is the
> reason for the missorted order ?
>
> By the way: The problem with the absence of POSIX-support was a result
> of copying a suspended VirtualMachine-GuestOS from a Dualprocessor-Host
> to a SingelProcessor-Host. (Sry for the needless question).
>
> Greets
>
> rs
>
>
> _______________________________________________
> Ntop mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop

_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to