summaryrefslogtreecommitdiffstats
path: root/server/parser
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2009-10-21 11:19:29 +0200
committerDavid Sommerseth <davids@redhat.com>2009-10-21 11:19:29 +0200
commit4cbd21f2ae3b4dbbe881ebf8e5d5b6dcf59ec67b (patch)
tree2d81280daf94c3488d3aa3c60df9af3fd20e2cf0 /server/parser
parent402d74dc6a266d37fa7ba6b67d39e70d0f098256 (diff)
Moved status codes into its own header file
Diffstat (limited to 'server/parser')
-rw-r--r--server/parser/parsethread.c1
-rw-r--r--server/parser/pgsql.c1
-rw-r--r--server/parser/pgsql.h12
-rw-r--r--server/parser/statuses.h39
4 files changed, 41 insertions, 12 deletions
diff --git a/server/parser/parsethread.c b/server/parser/parsethread.c
index 5de41f6..9d604c8 100644
--- a/server/parser/parsethread.c
+++ b/server/parser/parsethread.c
@@ -35,6 +35,7 @@
#include <parsethread.h>
#include <pgsql.h>
#include <threadinfo.h>
+#include <statuses.h>
/**
diff --git a/server/parser/pgsql.c b/server/parser/pgsql.c
index 930bfc2..4ed1ae0 100644
--- a/server/parser/pgsql.c
+++ b/server/parser/pgsql.c
@@ -41,6 +41,7 @@
#include <configparser.h>
#include <xmlparser.h>
#include <pgsql.h>
+#include <statuses.h>
/**
* Connect to a database, based on the given configuration
diff --git a/server/parser/pgsql.h b/server/parser/pgsql.h
index 1ea8feb..e9bf8a2 100644
--- a/server/parser/pgsql.h
+++ b/server/parser/pgsql.h
@@ -31,18 +31,6 @@
#include <eurephia_values.h>
#include <parsethread.h>
-#define STAT_NEW 0 /**< New, unparsed report in the submission queue */
-#define STAT_ASSIGNED 1 /**< Submission is assigned to a parser */
-#define STAT_INPROG 2 /**< Parsing has started */
-#define STAT_SUCCESS 3 /**< Report parsed successfully */
-#define STAT_UNKNFAIL 4 /**< Unkown failure */
-#define STAT_XMLFAIL 5 /**< Failed to parse the report XML file */
-#define STAT_SYSREG 6 /**< System registration failed */
-#define STAT_RTERIDREG 7 /**< Failed to get a new rterid value for the rteval run */
-#define STAT_GENDB 8 /**< General database error */
-#define STAT_RTEVRUNS 9 /**< Registering rteval run information failed */
-#define STAT_CYCLIC 10 /**< Registering cyclictest results failed */
-#define STAT_REPMOVE 11 /**< Failed to move the report file */
typedef PGconn dbconn; /**< Wrapper definition, for a more generic DB API */
/* Generic database function */
diff --git a/server/parser/statuses.h b/server/parser/statuses.h
new file mode 100644
index 0000000..701c8e8
--- /dev/null
+++ b/server/parser/statuses.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2009 Red Hat Inc.
+ *
+ * This application 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; version 2.
+ *
+ * This application 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.
+ */
+
+/**
+ * @file statuses.h
+ * @author David Sommerseth <davids@redhat.com>
+ * @date Wed Oct 21 11:17:24 2009
+ *
+ * @brief Status values used by rteval_parserd
+ *
+ */
+
+#ifndef _RTEVAL_STATUS_H
+#define _RTEVAL_STATUS_H
+
+#define STAT_NEW 0 /**< New, unparsed report in the submission queue */
+#define STAT_ASSIGNED 1 /**< Submission is assigned to a parser */
+#define STAT_INPROG 2 /**< Parsing has started */
+#define STAT_SUCCESS 3 /**< Report parsed successfully */
+#define STAT_UNKNFAIL 4 /**< Unkown failure */
+#define STAT_XMLFAIL 5 /**< Failed to parse the report XML file */
+#define STAT_SYSREG 6 /**< System registration failed */
+#define STAT_RTERIDREG 7 /**< Failed to get a new rterid value for the rteval run */
+#define STAT_GENDB 8 /**< General database error */
+#define STAT_RTEVRUNS 9 /**< Registering rteval run information failed */
+#define STAT_CYCLIC 10 /**< Registering cyclictest results failed */
+#define STAT_REPMOVE 11 /**< Failed to move the report file */
+
+#endif