From: <obo...@us...> - 2007-03-22 09:15:08
|
Revision: 179 http://svn.sourceforge.net/sipp/?rev=179&view=rev Author: oboulkroune Date: 2007-03-22 02:15:07 -0700 (Thu, 22 Mar 2007) Log Message: ----------- Fix: pcap on HPUX; Fix: Simple fixes identified with valgrind - provided by Charles P. Wright Modified Paths: -------------- sipp/trunk/prepare_pcap.c sipp/trunk/scenario.cpp sipp/trunk/sipp.hpp sipp/trunk/stat.cpp Modified: sipp/trunk/prepare_pcap.c =================================================================== --- sipp/trunk/prepare_pcap.c 2007-03-21 17:30:16 UTC (rev 178) +++ sipp/trunk/prepare_pcap.c 2007-03-22 09:15:07 UTC (rev 179) @@ -142,9 +142,12 @@ fprintf(stderr, "prepare_pcap.c: Ignoring non UDP packet!\n"); continue; } -#if defined(__DARWIN) || defined(__CYGWIN) || defined(__HPUX) +#if defined(__DARWIN) || defined(__CYGWIN) udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2) + 4); pktlen = (u_long)(ntohs(udphdr->uh_ulen)); +#elif defined ( __HPUX) + udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2)); + pktlen = (u_long) pkthdr->len - sizeof(*ethhdr) - sizeof(*iphdr); #else udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2)); pktlen = (u_long)(ntohs(udphdr->len)); Modified: sipp/trunk/scenario.cpp =================================================================== --- sipp/trunk/scenario.cpp 2007-03-21 17:30:16 UTC (rev 178) +++ sipp/trunk/scenario.cpp 2007-03-22 09:15:07 UTC (rev 179) @@ -60,6 +60,7 @@ /* Anyway */ start_rtd = 0; stop_rtd = 0; + repeat_rtd = 0; lost = 0; crlf = 0; test = 0; @@ -120,6 +121,10 @@ delete (peer_src); peer_src = NULL; + if(pause_desc != NULL) + free(pause_desc); + pause_desc = NULL; + #ifdef __3PCC__ if(M_sendCmdData != NULL) delete(M_sendCmdData); Modified: sipp/trunk/sipp.hpp =================================================================== --- sipp/trunk/sipp.hpp 2007-03-21 17:30:16 UTC (rev 178) +++ sipp/trunk/sipp.hpp 2007-03-22 09:15:07 UTC (rev 179) @@ -92,7 +92,7 @@ /************************** Constants **************************/ -#define SIPP_VERSION 20070321 +#define SIPP_VERSION 20070322 #define T_UDP 0 #define T_TCP 1 #ifdef _USE_OPENSSL Modified: sipp/trunk/stat.cpp =================================================================== --- sipp/trunk/stat.cpp 2007-03-21 17:30:16 UTC (rev 178) +++ sipp/trunk/stat.cpp 2007-03-22 09:15:07 UTC (rev 179) @@ -843,9 +843,13 @@ CStat::~CStat () { - - - + for (int i = 0; i < MAX_RTD_INFO_LENGTH; i++) { + if (M_ResponseTimeRepartition[i] == NULL) + continue; + delete M_ResponseTimeRepartition[i]; + } + if (M_CallLengthRepartition != NULL) + delete M_CallLengthRepartition; } char* CStat::sRepartitionHeader(T_dynamicalRepartition * tabRepartition, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |