rpms/sipp/F-12 sipp--3.1svn586.diff, NONE, 1.1 import.log, 1.2, 1.3 sipp--CVE-2008-2085-fix.diff, 1.1, 1.2 sipp.spec, 1.15, 1.16 sipp--INT_MAX_headers_for_gcc43.diff, 1.1, NONE sipp--get_remote_port_media.diff, 1.1, NONE

Peter Lemenkov peter at fedoraproject.org
Tue Jan 26 10:21:45 UTC 2010


Author: peter

Update of /cvs/pkgs/rpms/sipp/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23844/F-12

Modified Files:
	import.log sipp--CVE-2008-2085-fix.diff sipp.spec 
Added Files:
	sipp--3.1svn586.diff 
Removed Files:
	sipp--INT_MAX_headers_for_gcc43.diff 
	sipp--get_remote_port_media.diff 
Log Message:
Updated to svn ver. 586

sipp--3.1svn586.diff:
 Makefile        |   34 -
 actions.cpp     |   96 +--
 actions.hpp     |   19 
 auth.c          |   72 +-
 call.cpp        | 1479 ++++++++++++++++++++++++++++++++++++--------------------
 call.hpp        |   70 +-
 deadcall.cpp    |    6 
 deadcall.hpp    |    6 
 fortune.cpp     |   85 +++
 infile.cpp      |   89 +++
 infile.hpp      |   10 
 listener.hpp    |    2 
 message.cpp     |   91 ++-
 message.hpp     |   15 
 opentask.cpp    |  257 +++++++++
 opentask.hpp    |   62 ++
 reporttask.cpp  |  117 ++++
 reporttask.hpp  |   61 ++
 scenario.cpp    |  809 ++++++++++++++++--------------
 scenario.hpp    |   63 +-
 screen.cpp      |   48 +
 screen.hpp      |    9 
 send_packets.c  |   19 
 sipp.cpp        | 1239 +++++++++++++++++++++++-----------------------
 sipp.hpp        |   95 ++-
 socketowner.cpp |    4 
 stat.cpp        |  499 +++++++++++++-----
 stat.hpp        |   96 ++-
 task.cpp        |   20 
 task.hpp        |    2 
 variables.cpp   |   14 
 variables.hpp   |    3 
 watchdog.cpp    |   81 +++
 watchdog.hpp    |   58 ++
 xp_parser.c     |   59 +-
 35 files changed, 3733 insertions(+), 1956 deletions(-)

--- NEW FILE sipp--3.1svn586.diff ---
diff --git a/Makefile b/Makefile
index a215e39..23a3fac 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,8 @@ OUTPUT=sipp
 
 # C & C++ object files to be built
 OBJ= xp_parser.o message.o scenario.o screen.o call.o comp.o sipp.o stat.o \
-     actions.o variables.o infile.o deadcall.o task.o socketowner.o listener.o
+     actions.o variables.o infile.o deadcall.o task.o socketowner.o listener.o \
+     opentask.o reporttask.o watchdog.o
 
 # Libraries directories
 LIBDIR_linux=
@@ -160,43 +161,46 @@ INCDIR=$(INCDIR_$(SYSTEM))
 
 # Building without TLS and authentication (no openssl pre-requisite)
 all:
-	make OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` $(OUTPUT)
+	$(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` $(OUTPUT)
 
 # Building with TLS and authentication
 ossl:
-	make OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="auth.o sslinit.o sslthreadsafe.o  milenage.o rijndael.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5" $(OUTPUT)
+	$(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="auth.o sslinit.o sslthreadsafe.o  milenage.o rijndael.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5" $(OUTPUT)
 
 #Building with PCAP play
 pcapplay:
-	make OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lpcap" PCAPPLAY="-DPCAPPLAY" $(OUTPUT)
+	$(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lpcap" PCAPPLAY="-DPCAPPLAY" $(OUTPUT)
 
 pcapplay_ossl:
-	make OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="auth.o sslinit.o sslthreadsafe.o  milenage.o rijndael.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5"  OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lpcap `if test -f ./ext; then echo -L./ext/lib; fi;`" PCAPPLAY="-DPCAPPLAY `if test -f ./ext; then echo -I./ext/include; fi;`" $(OUTPUT)
+	$(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="auth.o sslinit.o sslthreadsafe.o  milenage.o rijndael.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5"  OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lpcap `if test -f ./ext; then echo -L./ext/lib; fi;`" PCAPPLAY="-DPCAPPLAY `if test -f ./ext; then echo -I./ext/include; fi;`" $(OUTPUT)
 
 pcapplay_hp_li_ia:
-	@_HPUX_LI_FLAG=-D_HPUX_LI ; export _HPUX_LI_FLAG ; make pcapplay
+	@_HPUX_LI_FLAG=-D_HPUX_LI ; export _HPUX_LI_FLAG ; $(MAKE) pcapplay
 
 pcapplay_ossl_hp_li_ia:
-	@_HPUX_LI_FLAG=-D_HPUX_LI ; export _HPUX_LI_FLAG ; make pcapplay_ossl
+	@_HPUX_LI_FLAG=-D_HPUX_LI ; export _HPUX_LI_FLAG ; $(MAKE) pcapplay_ossl
 
 pcapplay_cygwin:
-	make OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lwpcap" PCAPPLAY="-DPCAPPLAY" $(OUTPUT)
+	$(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lwpcap" PCAPPLAY="-DPCAPPLAY" $(OUTPUT)
 
 pcapplay_ossl_cygwin:
-	make OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="auth.o sslinit.o sslthreadsafe.o  milenage.o rijndael.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5"  OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lwpcap" PCAPPLAY="-DPCAPPLAY" $(OUTPUT)
+	$(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="auth.o sslinit.o sslthreadsafe.o  milenage.o rijndael.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5"  OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lwpcap" PCAPPLAY="-DPCAPPLAY" $(OUTPUT)
 
 $(OUTPUT): $(OBJ_TLS) $(OBJ_PCAPPLAY) $(OBJ)
 	$(CCLINK) $(LFLAGS) $(MFLAGS) $(LIBDIR_$(SYSTEM)) \
 	$(DEBUG_FLAGS) -o $@ $(OBJ_TLS) $(OBJ_PCAPPLAY) $(OBJ) $(LIBS) $(TLS_LIBS) $(PCAPPLAY_LIBS) $(EXTRAENDLIBS)
 
 debug:
-	DEBUG_FLAGS="-g -pg" ; export DEBUG_FLAGS ; make all
+	DEBUG_FLAGS="-g -pg" ; export DEBUG_FLAGS ; $(MAKE) all
 
 debug_ossl:
-	@DEBUG_FLAGS=-g ; export DEBUG_FLAGS ; make ossl
+	@DEBUG_FLAGS=-g ; export DEBUG_FLAGS ; $(MAKE) ossl
+
+debug_pcap:
+	@DEBUG_FLAGS=-g ; export DEBUG_FLAGS ; make pcapplay
 
 debug_pcap_cygwin:
-	@DEBUG_FLAGS=-g ; export DEBUG_FLAGS ; make pcapplay_ossl_cygwin
+	@DEBUG_FLAGS=-g ; export DEBUG_FLAGS ; $(MAKE) pcapplay_ossl_cygwin
 
 clean:
 	rm -f *.o $(OUTPUT) *~ $(TOCLEAN) 
@@ -204,7 +208,7 @@ clean:
 
 archive:
 	rm -f TMP_TAR_FILE.* $(ARCHIVE)
-	make clean
+	$(MAKE) clean
 	tar cf TMP_TAR_FILE.tar .
 	gzip TMP_TAR_FILE.tar
 	cp TMP_TAR_FILE.tar.gz $(ARCHIVE)
@@ -224,3 +228,7 @@ archive:
 
 .c.o:
 	$(CC) $(CFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $<
+
+fortune.so: fortune.cpp
+	g++ -fPIC $(CPPFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o fortune.o $<
+	gcc -shared -Wl,-soname,fortune.so -o $@ fortune.o
diff --git a/actions.cpp b/actions.cpp
index 92ad968..f944233 100644
--- a/actions.cpp
+++ b/actions.cpp
@@ -66,7 +66,7 @@ const char * CAction::comparatorToString(T_Comparator comp) {
 
 bool CAction::compare(VariableTable *variableTable) {
   double lhs = variableTable->getVar(M_varInId)->getDouble();
-  double rhs = M_doubleValue;
+  double rhs = M_varIn2Id ? variableTable->getVar(M_varIn2Id)->getDouble() : M_doubleValue;
 
   switch(M_comp) {
     case E_C_EQ:
@@ -91,58 +91,60 @@ void CAction::afficheInfo()
 {
   if (M_action == E_AT_ASSIGN_FROM_REGEXP) {
     if(M_lookingPlace == E_LP_MSG) {
-      printf("Type[%d] - regexp[%s] where[%s] - checkIt[%d] - $%s",
+            printf("Type[%d] - regexp[%s] where[%s] - checkIt[%d] - checkItInverse[%d] - $%s",
              M_action,
 	     M_regularExpression,
              "Full Msg",
              M_checkIt,
+                   M_checkItInverse,
 		       display_scenario->allocVars->getName(M_varId));
     } else {
-      printf("Type[%d] - regexp[%s] where[%s-%s] - checkIt[%d] - $%d",
+            printf("Type[%d] - regexp[%s] where[%s-%s] - checkIt[%d] - checkItInverse[%d] - $%s",
              M_action,
 	     M_regularExpression,
              "Header",
              M_lookingChar,
-             M_checkIt, display_scenario->allocVars->getName(M_varId));
+                   M_checkIt,
+                   M_checkItInverse, display_scenario->allocVars->getName(M_varId));
     }
   } else if (M_action == E_AT_EXECUTE_CMD) {
-    if (M_cmdLine) {
-        printf("Type[%d] - command[%-32.32s]", M_action, M_cmdLine);
-    }
+    printf("Type[%d] - command[%-32.32s]", M_action, M_message_str[0]);
   } else if (M_action == E_AT_EXEC_INTCMD) {
       printf("Type[%d] - intcmd[%-32.32s]", M_action, strIntCmd(M_IntCmd));
   } else if (M_action == E_AT_LOG_TO_FILE) {
-      printf("Type[%d] - message[%-32.32s]", M_action, M_message[0]);
+      printf("Type[%d] - message[%-32.32s]", M_action, M_message_str[0]);
   } else if (M_action == E_AT_LOG_WARNING) {
-      printf("Type[%d] - warning[%-32.32s]", M_action, M_message[0]);
+      printf("Type[%d] - warning[%-32.32s]", M_action, M_message_str[0]);
+  } else if (M_action == E_AT_LOG_ERROR) {
+      printf("Type[%d] - error[%-32.32s]", M_action, M_message_str[0]);
   } else if (M_action == E_AT_ASSIGN_FROM_SAMPLE) {
       char tmp[40];
       M_distribution->textDescr(tmp, sizeof(tmp));
-      printf("Type[%d] - sample varId[%d] %s", M_action, display_scenario->allocVars->getName(M_varId), tmp);
+      printf("Type[%d] - sample varId[%s] %s", M_action, display_scenario->allocVars->getName(M_varId), tmp);
   } else if (M_action == E_AT_ASSIGN_FROM_VALUE) {
-      printf("Type[%d] - assign varId[%d] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue);
+      printf("Type[%d] - assign varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue);
   } else if (M_action == E_AT_ASSIGN_FROM_INDEX) {
-      printf("Type[%d] - assign index[%d]", M_action, display_scenario->allocVars->getName(M_varId));
+      printf("Type[%d] - assign index[%s]", M_action, display_scenario->allocVars->getName(M_varId));
   } else if (M_action == E_AT_ASSIGN_FROM_GETTIMEOFDAY) {
-      printf("Type[%d] - assign gettimeofday[%d, %d]", M_action, display_scenario->allocVars->getName(M_varId));
+      printf("Type[%d] - assign gettimeofday[%s, %s]", M_action, display_scenario->allocVars->getName(M_varId), display_scenario->allocVars->getName(M_subVarId[0]));
   } else if (M_action == E_AT_ASSIGN_FROM_STRING) {
-      printf("Type[%d] - string assign varId[%d] [%-32.32s]", M_action, display_scenario->allocVars->getName(M_varId), M_message[0]);
+      printf("Type[%d] - string assign varId[%s] [%-32.32s]", M_action, display_scenario->allocVars->getName(M_varId), M_message_str[0]);
   } else if (M_action == E_AT_JUMP) {
-      printf("Type[%d] - jump varInId[%d] %lf", M_action, display_scenario->allocVars->getName(M_varInId), M_doubleValue);
+      printf("Type[%d] - jump varInId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varInId), M_doubleValue);
   } else if (M_action == E_AT_PAUSE_RESTORE) {
-      printf("Type[%d] - restore pause varInId[%d] %lf", M_action, display_scenario->allocVars->getName(M_varInId), M_doubleValue);
+      printf("Type[%d] - restore pause varInId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varInId), M_doubleValue);
   } else if (M_action == E_AT_VAR_ADD) {
-      printf("Type[%d] - add varId[%d] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue);
+      printf("Type[%d] - add varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue);
   } else if (M_action == E_AT_VAR_MULTIPLY) {
-      printf("Type[%d] - multiply varId[%d] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue);
+      printf("Type[%d] - multiply varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue);
   } else if (M_action == E_AT_VAR_DIVIDE) {
-      printf("Type[%d] - divide varId[%d] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue);
+      printf("Type[%d] - divide varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue);
   } else if (M_action == E_AT_VAR_TRIM) {
-      printf("Type[%d] - trim varId[%d]", M_action, display_scenario->allocVars->getName(M_varId));
+      printf("Type[%d] - trim varId[%s]", M_action, display_scenario->allocVars->getName(M_varId));
   } else if (M_action == E_AT_VAR_TEST) {
-      printf("Type[%d] - divide varId[%d] varInId[%d] %s %lf", M_action, display_scenario->allocVars->getName(M_varId), display_scenario->allocVars->getName(M_varInId), comparatorToString(M_comp), M_doubleValue);
+      printf("Type[%d] - divide varId[%s] varInId[%s] %s %lf", M_action, display_scenario->allocVars->getName(M_varId), display_scenario->allocVars->getName(M_varInId), comparatorToString(M_comp), M_doubleValue);
   } else if (M_action == E_AT_VAR_TO_DOUBLE) {
-      printf("Type[%d] - toDouble varId[%d]", M_action, display_scenario->allocVars->getName(M_varId));
+      printf("Type[%d] - toDouble varId[%s]", M_action, display_scenario->allocVars->getName(M_varId));
 #ifdef PCAPPLAY
   } else if ((M_action == E_AT_PLAY_PCAP_AUDIO) || (M_action == E_AT_PLAY_PCAP_VIDEO)) {
       printf("Type[%d] - file[%s]", M_action, M_pcapArgs->file);
@@ -159,14 +161,15 @@ CAction::T_IntCmdType   CAction::getIntCmd ()      { return(M_IntCmd);       }
 CAction::T_Comparator   CAction::getComparator ()  { return(M_comp);	     }
 
 bool           CAction::getCheckIt()      { return(M_checkIt);      }
+bool           CAction::getCheckItInverse() { return(M_checkItInverse);      }
 bool           CAction::getCaseIndep()    { return(M_caseIndep);    }
 bool           CAction::getHeadersOnly()  { return(M_headersOnly);  }
 int            CAction::getOccurence()    { return(M_occurence);    }
 int            CAction::getVarId()        { return(M_varId);        }
 int            CAction::getVarInId()      { return(M_varInId);      }
+int            CAction::getVarIn2Id()      { return(M_varIn2Id);      }
 char*          CAction::getLookingChar()  { return(M_lookingChar);  }
 SendingMessage *CAction::getMessage(int n)      { return(M_message[n]);      }
-SendingMessage *CAction::getCmdLine()      { return(M_cmdLine);      }
 CSample*       CAction::getDistribution() { return(M_distribution); }
[...9664 lines suppressed...]
+ *           From Hewlett Packard Company.
+ *           F. Tarek Rogers
+ *           Peter Higginson
+ *           Vincent Luba
+ *           Shriram Natarajan
+ *           Guillaume Teissier from FTR&D
+ *           Clement Chen
+ *           Wolfgang Beck
+ *           Charles P Wright from IBM Research
+ */
+#include "sipp.hpp"
+
+void watchdog::dump() {
+  WARNING("Watchdog Task: interval = %d, major_threshold = %d (%d triggers left), minor_threshold = %d (%d triggers left)", interval, major_threshold, major_maxtriggers, minor_threshold, minor_maxtriggers);
+}
+
+watchdog::watchdog(int interval, int reset_interval, int major_threshold, int major_maxtriggers, int minor_threshold, int minor_maxtriggers) {
+  this->interval = interval;
+  this->reset_interval = reset_interval;
+  this->major_threshold = major_threshold;
+  this->major_maxtriggers = major_maxtriggers;
+  this->minor_threshold = minor_threshold;
+  this->minor_maxtriggers = minor_maxtriggers;
+  major_triggers = 0;
+  minor_triggers = 0;
+  last_trigger = last_fire = getmilliseconds();
+}
+
+bool watchdog::run() {
+  getmilliseconds();
+  if (last_fire + this->major_threshold < clock_tick) {
+	CStat::globalStat(CStat::E_WATCHDOG_MAJOR);
+	last_trigger = clock_tick;
+	WARNING("The major watchdog timer %dms has been tripped (%d), %d trips remaining.", major_threshold, clock_tick - last_fire, major_maxtriggers - major_triggers);
+	if ((this->major_maxtriggers != -1) && (++major_triggers > this->major_maxtriggers)) {
+	  ERROR("The watchdog timer has tripped the major threshold of %dms too many times (%d out of %d allowed) (%d out of %d minor %dms timeouts tripped)\n", major_threshold, major_triggers, major_maxtriggers, minor_threshold, minor_triggers, minor_maxtriggers);
+	}
+  } else if (last_fire + this->minor_threshold < clock_tick) {
+	last_trigger = clock_tick;
+	CStat::globalStat(CStat::E_WATCHDOG_MINOR);
+	WARNING("The minor watchdog timer %dms has been tripped (%d), %d trips remaining.", minor_threshold, clock_tick - last_fire, minor_maxtriggers - minor_triggers);
+	if ((this->minor_maxtriggers != -1) && (++minor_triggers > this->minor_maxtriggers)) {
+	  ERROR("The watchdog timer has tripped the minor threshold of %dms too many times (%d out of %d allowed) (%d out of %d major %dms timeouts tripped)\n", minor_threshold, minor_triggers, minor_maxtriggers, major_threshold, major_triggers, major_maxtriggers);
+	}
+  }
+
+  if (reset_interval && (major_triggers || minor_triggers) && (last_trigger + reset_interval < clock_tick)) {
+    WARNING("Resetting watchdog timer trigger counts, as it has not been triggered in over %dms.", clock_tick - last_trigger);
+    major_triggers = minor_triggers = 0;
+  }
+
+  last_fire = clock_tick;
+  setPaused();
+  return true;
+}
+
+unsigned int watchdog::wake() {
+  return last_fire + interval;
+}
diff --git a/watchdog.hpp b/watchdog.hpp
new file mode 100644
index 0000000..4e2aca3
--- /dev/null
+++ b/watchdog.hpp
@@ -0,0 +1,58 @@
+/*
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *  Author : Richard GAYRAUD - 04 Nov 2003
+ *           Marc LAMBERTON
+ *           Olivier JACQUES
+ *           Herve PELLAN
+ *           David MANSUTTI
+ *           Francois-Xavier Kowalski
+ *           Gerard Lyonnaz
+ *           From Hewlett Packard Company.
+ *           F. Tarek Rogers
+ *           Peter Higginson
+ *           Vincent Luba
+ *           Shriram Natarajan
+ *           Guillaume Teissier from FTR&D
+ *           Clement Chen
+ *           Wolfgang Beck
+ *           Charles P Wright from IBM Research
+ */
+
+#ifndef WATCHDOG_HPP
+#define WATCHDOG_HPP
+
+#include "task.hpp"
+
+class watchdog : public task {
+public:
+  unsigned int wake();
+  watchdog(int interval, int reset, int major_threshold, int major_maxtriggers, int minor_threshold, int minor_maxtriggers);
+  bool run();
+  void dump();
+private:
+  int interval;
+  int reset_interval;
+  int minor_threshold;
+  int major_threshold;
+  int minor_maxtriggers;
+  int major_maxtriggers;
+  unsigned long last_fire;
+  unsigned long last_trigger;
+  int major_triggers;
+  int minor_triggers;
+};
+
+#endif
diff --git a/xp_parser.c b/xp_parser.c
index 1a2a3a5..ce0ca43 100644
--- a/xp_parser.c
+++ b/xp_parser.c
@@ -77,7 +77,6 @@ int xp_replace(char *source, char *dest, char *search, char *replace)
  * into other elements. */
 char * xp_find_start_tag_end(char *ptr)
 {
-  char *optr = ptr;
   while(*ptr) {
     if (*ptr == '<') {
       if ((strstr(ptr,"<!--") == ptr)) {
@@ -234,33 +233,37 @@ char * xp_open_element(int index)
         level--;
         if(level < 0) return NULL;
       } else {
-        if(level==0) {
-          if(index) {
-            index--;
-          } else {
-            char * end = xp_find_start_tag_end(ptr + 1);
-            char * p;
-            if(!end) return NULL;
-
-            p = strchr(ptr, ' ');
-            if(p && (p < end))  { end = p; }
-            p = strchr(ptr, '\t');
-            if(p && (p < end))  { end = p; }
-            p = strchr(ptr, '\r');
-            if(p && (p < end))  { end = p; }
-            p = strchr(ptr, '\n');
-            if(p && (p < end))  { end = p; }
-            p = strchr(ptr, '/');
-            if(p && (p < end))  { end = p; }
-
-            memcpy(name, ptr + 1, end-ptr-1);
-            name[end-ptr-1] = 0;
-            
-            xp_position[++xp_stack] = end;
-            return name;
-          }
-        }
-        level ++;
+	if(level==0) {
+	  if (index) {
+	    index --;
+	  } else {
+	    char * end = xp_find_start_tag_end(ptr + 1);
+	    char * p;
+	    if(!end) return NULL;
+
+	    p = strchr(ptr, ' ');
+	    if(p && (p < end))  { end = p; }
+	    p = strchr(ptr, '\t');
+	    if(p && (p < end))  { end = p; }
+	    p = strchr(ptr, '\r');
+	    if(p && (p < end))  { end = p; }
+	    p = strchr(ptr, '\n');
+	    if(p && (p < end))  { end = p; }
+	    p = strchr(ptr, '/');
+	    if(p && (p < end))  { end = p; }
+
+	    memcpy(name, ptr + 1, end-ptr-1);
+	    name[end-ptr-1] = 0;
+
+	    xp_position[++xp_stack] = end;
+	    return name;
+	  }
+	}
+
+	/* We want to skip over this particular element .*/
+	ptr = xp_find_start_tag_end(ptr + 1);
+	if (ptr) ptr--;
+	level ++;
       }
     } else if((*ptr == '/') && (*(ptr+1) == '>')) {
       level --;


Index: import.log
===================================================================
RCS file: /cvs/pkgs/rpms/sipp/F-12/import.log,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- import.log	18 Jun 2009 10:42:03 -0000	1.2
+++ import.log	26 Jan 2010 10:21:44 -0000	1.3
@@ -1,2 +1,3 @@
 sipp-3_1-2_fc9:HEAD:sipp-3.1-2.fc9.src.rpm:1215351390
 sipp-3_1-5_fc11:HEAD:sipp-3.1-5.fc11.src.rpm:1245321037
+sipp-3_1-8_svn586_fc12:F-12:sipp-3.1-8.svn586.fc12.src.rpm:1264501276

sipp--CVE-2008-2085-fix.diff:
 call.cpp |   41 +++++++++++++++++++++++++++++++++--------
 1 file changed, 33 insertions(+), 8 deletions(-)

Index: sipp--CVE-2008-2085-fix.diff
===================================================================
RCS file: /cvs/pkgs/rpms/sipp/F-12/sipp--CVE-2008-2085-fix.diff,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- sipp--CVE-2008-2085-fix.diff	6 Jul 2008 13:37:06 -0000	1.1
+++ sipp--CVE-2008-2085-fix.diff	26 Jan 2010 10:21:44 -0000	1.2
@@ -1,6 +1,6 @@
---- call.cpp.cve20082085	2008-07-06 12:38:01.000000000 +0400
-+++ call.cpp	2008-07-06 17:11:11.000000000 +0400
-@@ -125,17 +125,26 @@
+--- call.cpp~	2010-01-26 12:53:51.088641831 +0300
++++ call.cpp	2010-01-26 13:05:40.572508999 +0300
+@@ -133,17 +133,26 @@
      char pattern[] = "c=IN IP4 ";
      char *begin, *end;
      char ip[32];
@@ -30,13 +30,13 @@
      return inet_addr(ip);
  }
  
-@@ -148,20 +157,28 @@
+@@ -156,20 +165,28 @@
      char pattern[] = "c=IN IP6 ";
      char *begin, *end;
      char ip[128];
 +    char *tmp = strdup(msg);
  
-     memset(&addr, 0, sizeof(addr));
+     memset(addr, 0, sizeof(*addr));
      memset(ip, 0, 128);
  
 -    begin = strstr(msg, pattern);
@@ -59,10 +59,10 @@
 +    strncpy(ip, begin, sizeof(ip) - 1);
 +    ip[sizeof(ip) - 1] = 0;
 +    free(tmp);
-     if (!inet_pton(AF_INET6, ip, &addr)) {
+     if (!inet_pton(AF_INET6, ip, addr)) {
        return 0;
      }
-@@ -188,17 +205,25 @@
+@@ -196,17 +213,25 @@
  	ERROR("Internal error: Undefined media pattern %d\n", 3);
      }
  


Index: sipp.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sipp/F-12/sipp.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- sipp.spec	21 Aug 2009 15:52:49 -0000	1.15
+++ sipp.spec	26 Jan 2010 10:21:45 -0000	1.16
@@ -1,18 +1,15 @@
 Summary:	SIP test tool / traffic generator
 Name:		sipp
 Version:	3.1
-Release:	7%{?dist}
+Release:	8.svn586%{?dist}
 License:	GPLv2+
 Group:		Applications/Communications
 URL:		http://sipp.sourceforge.net/
 Source0:	http://downloads.sourceforge.net/%{name}/%{name}.%{version}.src.tar.gz
 Patch0:		sipp--Makefile-fix-paths.diff
-# https://sourceforge.net/tracker/index.php?func=detail&aid=1982103&group_id=104305&atid=637566
-Patch1:		sipp--INT_MAX_headers_for_gcc43.diff
 # https://sourceforge.net/tracker/index.php?func=detail&aid=2011751&group_id=104305&atid=637566
 Patch2:		sipp--CVE-2008-2085-fix.diff
-# taken from svn - allows 5-digit port numbers to be processed correctly
-Patch3:		sipp--get_remote_port_media.diff
+Patch4:		sipp--3.1svn586.diff
 BuildRequires:	ncurses-devel
 %if 0%{?el4}
 BuildRequires:	libpcap
@@ -34,10 +31,10 @@ retransmission management and dynamicall
 
 %prep
 %setup -qn %{name}.svn
-%patch0
-%patch1
+%patch0 -p0 -b .fix_paths
+%patch4 -p1 -b .svn586
 %patch2 -p0 -b .cve20082085
-%patch3 -p0 -b .5digits
+sed -i s,^SVN_VERSION=.*,SVN_VERSION=586,g Makefile
 
 %build
 DEBUG_FLAGS="%{optflags}" %{__make} %{?_smp_mflags} pcapplay_ossl
@@ -58,6 +55,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/%{name}
 
 %changelog
+* Mon Jan 25 2010 Peter Lemenkov <lemenkov at gmail.com> 3.1-8.svn586
+- Update to svn ver. 586 (fixes lots of small but nasty issues)
+- Removed patch1, patch3
+
 * Fri Aug 21 2009 Tomas Mraz <tmraz at redhat.com> - 3.1-7
 - rebuilt with new openssl
 


--- sipp--INT_MAX_headers_for_gcc43.diff DELETED ---


--- sipp--get_remote_port_media.diff DELETED ---



More information about the scm-commits mailing list