Luca:
sFlowPlugin bombs w/ no data... patch below?
-----Burton
--- ntop-current/plugins/sflowPlugin.c.save Wed Feb 6 11:10:56 2002
+++ ntop-current/plugins/sflowPlugin.c Wed Feb 6 11:11:32 2002
@@ -1512,5 +1512,9 @@
sendString("<CENTER>\n<HR>\n");
- percentage = (lastSample-initialPool)/numSamplesReceived;
+ if (numSamplesReceived == 0) {
+ percentage = 0.0;
+ } else {
+ percentage = (lastSample-initialPool)/numSamplesReceived;
+ }
err = 196 * sqrt((float)(1/(float)numSamplesReceived));
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listmanager.unipi.it/mailman/listinfo/ntop-dev