>
> By block of change...
>
> 609c609,610 - Maybe ... wouldn't myGlobals.rrdPath != NULL ?
> myGlobals.rrdPath : "." be better (absolute vs. relative path?)
I defer to you on that I was just fixing (actually a poster a while back
to this esteemed list:) a SEGV from reffing a null string. In your
comments later you mention just fixing this one yea I only fixed the
one that broke me:) I'll do the others in a unified and
send it in.
>
> 2630a2632,2633 - Not sure where this goes, without the context
Hot off this mornings CVS:)
Index: ntop/report.c
===================================================================
RCS file: /export/home/ntop/ntop/report.c,v
retrieving revision 2.162
diff -U3 -r2.162 report.c
--- ntop/report.c 27 Aug 2003 22:27:23 -0000 2.162
+++ ntop/report.c 28 Aug 2003 13:41:59 -0000
@@ -2630,6 +2630,9 @@
a = *((PortCounter**)_a);
b = *((PortCounter**)_b);
+ if((a == NULL) || (b == NULL))
+ return(0);
+
if((a->sent+a->rcvd) > (b->sent+b->rcvd))
return(-1);
else
>
> 1108a1109,1119 - Yes
>
> 3693c3704,3705 - Maybe ... wouldn't myGlobals.rrdPath != NULL ?
> myGlobals.rrdPath : "." be better (absolute vs. relative path?)
You are correct here I am sure.
>
> configureextra
> You're right, it should no longer be necessary
>
> 1690a1691,1692 - seems like that test is already in there, plus there's
> already a dup?
Looks like we're all fixing the same things. I'll try and co the
latest before sending any more in.
>
> if(myGlobals.device[k].ipTrafficMatrix == NULL)
> continue;
> if(myGlobals.device[k].ipTrafficMatrix == NULL)
> continue;
> if(myGlobals.device[k].ipTrafficMatrix[idx] == NULL)
> continue;
>
> Also, shouldn't this:
>
> snprintf(rrdPath, sizeof(rrdPath),
> "%s/interfaces/%s/matrix/%s/%s/", myGlobals.rrdPath,
>
> be this:
> snprintf(rrdPath, sizeof(rrdPath),
> "%s/interfaces/%s/matrix/%s/%s/",
> myGlobals.rrdPath != NULL ? myGlobals.rrdPath : "." ,
>
> (actually, there's a lot of cases of myGlobals.rrdPath in there - why don't
> you fix 'em all at once and send me the diff)
>
> I'll apply #s 3, 1 & 4 (with . not "")
>
> Let me know where #2 and #5 belong.
>
> -----Burton
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
> Of Chris Turbeville
> Sent: Tuesday, August 26, 2003 9:31 PM
> To: [EMAIL PROTECTED]
> Subject: [Ntop-dev] Sparc Sol9 patches
>
>
> Here's the summary of the work I've done to get NTOP running on Solaris:
>
> <snip/>
>
> Index: ntop/report.c
> ===================================================================
> RCS file: /export/home/ntop/ntop/report.c,v
> retrieving revision 2.161
> diff -r2.161 report.c
> 609c609,610
> < snprintf(buf, sizeof(buf), "%s/interfaces/%s", myGlobals.rrdPath,
> ---
> > snprintf(buf, sizeof(buf), "%s/interfaces/%s",
> > myGlobals.rrdPath != NULL ? myGlobals.rrdPath : "",
> 2630a2632,2633
> > if((a == NULL) || (b == NULL))
> > return(0);
>
> Another ** being checked but not the *.
> Index: ntop/reportUtils.c
> ===================================================================
> RCS file: /export/home/ntop/ntop/reportUtils.c,v
> retrieving revision 2.160
> diff -r2.160 reportUtils.c
> 1108a1109,1119
> > if((*a == NULL) && (*b != NULL)) {
> > traceEvent(CONST_TRACE_WARNING, "cmpFctn() error (4)");
> > return(1);
> > } else if((*a != NULL) && (*b == NULL)) {
> > traceEvent(CONST_TRACE_WARNING, "cmpFctn() error (5)");
> > return(-1);
> > } else if((*a == NULL) && (*b == NULL)) {
> > traceEvent(CONST_TRACE_WARNING, "cmpFctn() error (6)");
> > return(0);
> > }
> >
> 3693c3704,3705
> < snprintf(buf, sizeof(buf), "%s/interfaces/%s/hosts/%s",
> myGlobals.rrdPath,
> ---
> > snprintf(buf, sizeof(buf), "%s/interfaces/%s/hosts/%s",
> > myGlobals.rrdPath != NULL ? myGlobals.rrdPath : "",
>
> <snip/>
>
> This is a fix for myrrd to fine /usr/local/include the news CVS may
> obviate this.
> Index: ntop/configureextra/SOLARIS9
> ===================================================================
> RCS file: /export/home/ntop/ntop/configureextra/SOLARIS9,v
> retrieving revision 1.1
> diff -r1.1 SOLARIS9
> 6a7
> > INCS="${INCS} -I/usr/local/include -I/opt/sfw/include"
>
> <snip/>
>
> Another NULL check
> Index: ntop/plugins/rrdPlugin.c
> ===================================================================
> RCS file: /export/home/ntop/ntop/plugins/rrdPlugin.c,v
> retrieving revision 2.90
> diff -r2.90 rrdPlugin.c
> 1690a1691,1692
> > if(myGlobals.device[k].ipTrafficMatrix == NULL)
> > continue;
>
> --
> [EMAIL PROTECTED] Chris Turbeville
> NTT/VERIO
> Send mail with subject "send PGP Key" for PGP 6.5.2 Public key
>
>
> _______________________________________________
> Ntop-dev mailing list
> [EMAIL PROTECTED]
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev
>
--
[EMAIL PROTECTED] Chris Turbeville NTT/VERIO
Send mail with subject "send PGP Key" for PGP 6.5.2 Public key
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev