On Aug 26, 2009, at 9:18 PM, [email protected] wrote:

After several-day hacking, I finally make the Data Dump working again. The version based is 3.3.10.

First, here is deadcode in http.c starting at line 2681, the parent will return(0) in the then branch and the child will quit (signal(SIGALRM, quitNow)) in the else branch. Therefore, the nested strncasecmp() after that will NEVER be executed, and thus actual function of CONST_DUMP_DATA_HTML will not be executed.

What is the purpose to have such kind of dead code?

I don't see any dead code. Can you please explain?

Luca


Thanks

--Xinan



-----------------
else {
        *usedFork = 1;
        /* This is zero in the parent copy of the structure */
        if(myGlobals.childntoppid) {
          /* father process */
          myGlobals.numChildren++;
          compressFile = 0;
          if(domainNameParm != NULL) free(domainNameParm);
          if(db_key != NULL) free(db_key);
          if(db_val != NULL) free(db_val);
          return(0);
        } else {
          detachFromTerminalUnderUnix(0);
          /* Close inherited sockets */
#ifdef HAVE_OPENSSL
if(myGlobals.sslInitialized) closeNwSocket (&myGlobals.sock_ssl);
#endif /* HAVE_OPENSSL */
if(myGlobals.runningPref.webPort > 0) closeNwSocket (&myGlobals.sock); //!#if defined(HAVE_ALARM) && defined(PARM_FORK_CHILD_PROCESS) && (! defined(WIN32))
          signal(SIGALRM, quitNow);
          alarm(120); /* Don't freeze */
        }
      }
--------------------------------------------------
_______________________________________________
Ntop-dev mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev

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

Reply via email to