Warning fixes in CREAM state machine.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 6 Apr 2010 19:21:33 +0000 (19:21 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 6 Apr 2010 19:21:33 +0000 (19:21 +0000)
org.glite.lb.common/interface/jobstat.h.T
org.glite.lb.state-machine/src/process_event_cream.c

index 8302253..d9fdc87 100644 (file)
@@ -212,6 +212,11 @@ extern enum edg_wll_StatJw_status edg_wll_StringToJWStat(const char *);
  */
 extern char *edg_wll_JWStatToString(enum edg_wll_StatJw_status);
 
+/**
+ * Convert string CREAM status to numeric code.
+ */
+extern enum edg_wll_StatCream_state edg_wll_StringToCreamStat(const char *name);
+
 /** 
  * Convert numeric CREAM status code to string representation
  */
index d4fc60d..253c055 100644 (file)
@@ -17,6 +17,7 @@ limitations under the License.
 */
 
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -38,15 +39,6 @@ limitations under the License.
 #define UNUSED_VAR
 #endif
 
-static int compare_timestamps(struct timeval a, struct timeval b)
-{
-       if ( (a.tv_sec > b.tv_sec) || 
-               ((a.tv_sec == b.tv_sec) && (a.tv_usec > b.tv_usec)) ) return 1;
-       if ( (a.tv_sec < b.tv_sec) ||
-                ((a.tv_sec == b.tv_sec) && (a.tv_usec < b.tv_usec)) ) return -1;
-       return 0;
-}
-
 /* XXX lookup table */
 static char *cream_states[EDG_WLL_NUMBER_OF_CREAM_STATES];