[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[monit-dev] [monit] r223 committed - [No log message]
From: |
monit |
Subject: |
[monit-dev] [monit] r223 committed - [No log message] |
Date: |
Tue, 24 Aug 2010 08:13:46 +0000 |
Revision: 223
Author: martin2812
Date: Tue Aug 24 01:12:53 2010
Log: [No log message]
http://code.google.com/p/monit/source/detail?r=223
Modified:
/trunk/monitor.h
/trunk/xml.c
=======================================
--- /trunk/monitor.h Mon Aug 23 06:44:07 2010
+++ /trunk/monitor.h Tue Aug 24 01:12:53 2010
@@ -139,9 +139,6 @@
#define MODE_PASSIVE 1
#define MODE_MANUAL 2
-#define MSGTYPE_STATUS 0
-#define MSGTYPE_EVENT 1
-
#define OPERATOR_GREATER 0
#define OPERATOR_LESS 1
#define OPERATOR_EQUAL 2
=======================================
--- /trunk/xml.c Mon Aug 23 06:44:07 2010
+++ /trunk/xml.c Tue Aug 24 01:12:53 2010
@@ -67,7 +67,7 @@
/* --------------------------------------------------------------
Prototypes */
-static void document_head(Buffer_T *, int);
+static void document_head(Buffer_T *);
static void document_foot(Buffer_T *);
static void status_service(Service_T, Buffer_T *, short);
static void status_servicegroup(ServiceGroup_T, Buffer_T *, short);
@@ -92,16 +92,19 @@
memset(&B, 0, sizeof(Buffer_T));
+ document_head(&B);
if (E) {
- document_head(&B, MSGTYPE_EVENT);
status_event(E, &B);
} else {
- document_head(&B, MSGTYPE_STATUS);
+ Util_stringbuffer(&B, "<services>");
for (S = servicelist_conf; S; S = S->next_conf)
status_service(S, &B, L);
+ Util_stringbuffer(&B, "</services>");
+ Util_stringbuffer(&B, "<servicegroups>");
for (SG = servicegrouplist; SG; SG = SG->next)
status_servicegroup(SG, &B, L);
+ Util_stringbuffer(&B, "</servicegroups>");
}
document_foot(&B);
@@ -118,11 +121,11 @@
* Prints a document header into the given buffer.
* @param B Buffer object
*/
-static void document_head(Buffer_T *B, int msgtype) {
+static void document_head(Buffer_T *B) {
Util_stringbuffer(B,
"<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"
- "<monit id=\"%s\" incarnation=\"%lld\" version=\"%s\" msgtype=\"%d\">"
+ "<monit id=\"%s\" incarnation=\"%lld\" version=\"%s\">"
"<server>"
"<uptime>%ld</uptime>"
"<poll>%d</poll>"
@@ -132,7 +135,6 @@
Run.id,
(long long)Run.incarnation,
VERSION,
- msgtype,
(long)Util_getProcessUptime(Run.pidfile),
Run.polltime,
Run.startdelay,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [monit-dev] [monit] r223 committed - [No log message],
monit <=