Florian
I have committed the fix (many thanks) but I want to fully rewrite the sessions 
code as it's too complex and buggy

Regards Luca

On Mar 11, 2011, at 10:51 AM, Florian Feucht wrote:

> Hi,
> 
> Fixed a nullpointer exception (scanTimedoutTCPSessions, sessions.c), 
> traceEvent was accessing theSession, but theSession was set to NULL above.
> 
> Index: sessions.c
> ===================================================================
> --- sessions.c  (revision 4526)
> +++ sessions.c  (working copy)
> @@ -396,10 +396,10 @@
>        u_char free_session;
> 
>        if(theSession->magic != CONST_MAGIC_NUMBER) {
> +        traceEvent(CONST_TRACE_ERROR, "Bad magic number 
> (expected=%d/real=%d) scanTimedoutTCPSessions()",
> +                  CONST_MAGIC_NUMBER, theSession->magic);
>         theSession = NULL;
>         myGlobals.device[actualDeviceId].numTcpSessions--;
> -        traceEvent(CONST_TRACE_ERROR, "Bad magic number 
> (expected=%d/real=%d) scanTimedoutTCPSessions()",
> -                  CONST_MAGIC_NUMBER, theSession->magic);
>         continue;
>        }
> 
> Greetings,
> 
> Florian
> 
> _______________________________________________
> Ntop-dev mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-dev

---
If you can not measure it, you can not improve it - Lord Kelvin

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

Reply via email to