For a while now, I've been having trouble seeing any .png files generated by
ntop using SSL.. if I tried to view the same image using HTTP it works just
fine.. I tracked the problem down to util.c .. here is a very small patch that
fixes the problem.
It turns out where you check sizeof(fileName) in the snprintf, you really needed
to use len.. sizeof(fileName) == sizeof(char *) or four bytes on my system..
syslog would show messages like this before my patch..
May 10 14:28:10 ny-inet-gw ntop[8420]: **WARNING** Unable to create temp. file
(/tm).
*** util.c.orig 2004-05-10 14:30:36.000000000 -0400
--- util.c 2004-05-10 14:30:53.000000000 -0400
***************
*** 2846,2852 ****
char tmpFileName[NAME_MAX];
strcpy(tmpFileName, fileName);
! if(snprintf(fileName, sizeof(fileName), "%s-%lu", tmpFileName,
myGlobals.numHandledRequests[0]+myGlobals.numHandledRequests[1]) <
0)
BufferTooShort();
fd = fopen(fileName, "wb");
--- 2846,2852 ----
char tmpFileName[NAME_MAX];
strcpy(tmpFileName, fileName);
! if(snprintf(fileName, len, "%s-%lu", tmpFileName,
myGlobals.numHandledRequests[0]+myGlobals.numHandledRequests[1]) <
0)
BufferTooShort();
fd = fopen(fileName, "wb");
--
Tony Nelson
Director of IT Operations
Starpoint Solutions LLC
115 Broadway, 2nd Fl
New York, NY 10006
_______________________________________________
Ntop-dev mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop-dev