LOL - funny rules!  I only took "basic" C/ Turbo C++ LONG ago, so if I was 
taught that I surely forgot it by now! 

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Clark, Philip
Sent: Monday, March 22, 2010 2:08 PM
To: '[email protected]'
Subject: Re: [Ntop] Host Communities Summary Page


 
> 
> HOWEVER....  Drilling into a community;
> (hostCommunities.html?dom=MyCommunity) returns the "No Data To Display 
> (yet)."
> 
> I like the community aggregation - wish it worked!
> 

That sounds like it may be a slightly different problem to mine.
But, if you're now running 3.4-pre3, then I think I've found the problem with 
that.

In report.c at around line 5820 there is:

  all_hosts_community:
    keyValue = 0, found = 0;

Then, at the other end of the "loop" we have:

  keyValue++;
  goto all_hosts_community;

Which, for the most part, means that keyValue is incremented and then set right 
back to zero. Moving the initialisation of keyValue before the label seems to 
do the trick. Like so:

    keyValue = 0;
  all_hosts_community:
    found = 0;

To get to the right point in report.c, you can do a case sensetive search for " 
Com" (leading space). The second occurance of that is a comment just before the 
place I made the change.

This reminded me of the first two laws of C programming that I was
taught:

  Rule 1: Never, ever, use a goto statement.
  Rule 2: There are no exceptions to Rule 1.


Cheers, Phil.

**********************************************************************************
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the NHS Borders Servicedesk 
on
01896 82 77 77.

Opinions expressed herein are those of the sender and do NOT represent the 
corporate position of NHS  Borders

This footnote also confirms that this email message has been swept by 
MIMEsweeper.

*** NHS Borders 
*******************************************************************

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





<font size="1">
<div style='border:none;border-bottom:double windowtext 2.25pt;padding:0in 0in 
1.0pt 0in'>
</div>
"This email is intended to be reviewed by only the intended recipient
 and may contain information that is privileged and/or confidential.
 If you are not the intended recipient, you are hereby notified that
 any review, use, dissemination, disclosure or copying of this email
 and its attachments, if any, is strictly prohibited.  If you have
 received this email in error, please immediately notify the sender by
 return email and delete this email from your system."
</font>

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

Reply via email to