"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/http/xml.c" between
monit-5.27.2.tar.gz and monit-5.28.0.tar.gz

About: Monit is a utility for managing and monitoring processes, files, directories and filesystems (with automatic error recovery).

xml.c  (monit-5.27.2):xml.c  (monit-5.28.0)
skipping to change at line 458 skipping to change at line 458
default: default:
break; break;
} }
for (Icmp_T i = S->icmplist; i; i = i->next) { for (Icmp_T i = S->icmplist; i; i = i->next) {
StringBuffer_append(B, StringBuffer_append(B,
"<icmp>" "<icmp>"
"<type>%s</type>" "<type>%s</type>"
"<responsetime>%.6f</responsetime>" "<responsetime>%.6f</responsetime>"
"</icmp>", "</icmp>",
icmpnames[i->type], icmpnames[i->type],
i->is_available == Connection_Ok ? i ->response / 1000. : -1.); // We send the response time in [s] for backward comp atibility (with microseconds precision) i->is_available == Connection_Ok ? i ->responsetime.current / 1000. : -1.); // We send the response time in [s] for b ackward compatibility (with microseconds precision)
} }
for (Port_T p = S->portlist; p; p = p->next) { for (Port_T p = S->portlist; p; p = p->next) {
StringBuffer_append(B, StringBuffer_append(B,
"<port>" "<port>"
"<hostname>%s</hostname>" "<hostname>%s</hostname>"
"<portnumber>%d</portnumber>" "<portnumber>%d</portnumber>"
"<request><![CDATA[%s]]></request>" "<request><![CDATA[%s]]></request>"
"<protocol>%s</protocol>" "<protocol>%s</protocol>"
"<type>%s</type>" "<type>%s</type>"
"<responsetime>%.6f</responsetime>", "<responsetime>%.6f</responsetime>",
p->hostname ? p->hostname : "", p->hostname ? p->hostname : "",
p->target.net.port, p->target.net.port,
Util_portRequestDescription(p), Util_portRequestDescription(p),
p->protocol->name ? p->protocol->nam e : "", p->protocol->name ? p->protocol->nam e : "",
Util_portTypeDescription(p), Util_portTypeDescription(p),
p->is_available == Connection_Ok ? p ->response / 1000. : -1.); // We send the response time in [s] for backward comp atibility (with microseconds precision) p->is_available == Connection_Ok ? p ->responsetime.current / 1000. : -1.); // We send the response time in [s] for b ackward compatibility (with microseconds precision)
if (p->target.net.ssl.options.flags) if (p->target.net.ssl.options.flags)
StringBuffer_append(B, StringBuffer_append(B,
"<certificate>" "<certificate>"
"<valid>%d</valid>" "<valid>%d</valid>"
"</certificate>", "</certificate>",
p->target.net.ssl.certificate.validD ays); p->target.net.ssl.certificate.validD ays);
StringBuffer_append(B, StringBuffer_append(B,
"</port>"); "</port>");
} }
for (Port_T p = S->socketlist; p; p = p->next) { for (Port_T p = S->socketlist; p; p = p->next) {
StringBuffer_append(B, StringBuffer_append(B,
"<unix>" "<unix>"
"<path>%s</path>" "<path>%s</path>"
"<protocol>%s</protocol>" "<protocol>%s</protocol>"
"<responsetime>%.6f</responsetime>" "<responsetime>%.6f</responsetime>"
"</unix>", "</unix>",
p->target.unix.pathname ? p->target. unix.pathname : "", p->target.unix.pathname ? p->target. unix.pathname : "",
p->protocol->name ? p->protocol->nam e : "", p->protocol->name ? p->protocol->nam e : "",
p->is_available == Connection_Ok ? p ->response / 1000. : -1.); // We send the response time in [s] for backward comp atibility (with microseconds precision) p->is_available == Connection_Ok ? p ->responsetime.current / 1000. : -1.); // We send the response time in [s] for b ackward compatibility (with microseconds precision)
} }
if (S->type == Service_System) { if (S->type == Service_System) {
StringBuffer_append(B, StringBuffer_append(B,
"<system>" "<system>"
"<load>" "<load>"
"<avg01>%.2f</avg01>" "<avg01>%.2f</avg01>"
"<avg05>%.2f</avg05>" "<avg05>%.2f</avg05>"
"<avg15>%.2f</avg15>" "<avg15>%.2f</avg15>"
"</load>" "</load>"
"<cpu>", "<cpu>",
skipping to change at line 598 skipping to change at line 598
(long long)E->collected.tv_sec, (long long)E->collected.tv_sec,
(long)E->collected.tv_usec, (long)E->collected.tv_usec,
E->id == Event_Instance ? "Monit" : E->source->name, E->id == Event_Instance ? "Monit" : E->source->name,
E->type, E->type,
E->id, E->id,
E->state, E->state,
Event_get_action(E)); Event_get_action(E));
if (E->message) if (E->message)
_escapeCDATA(B, E->message); _escapeCDATA(B, E->message);
StringBuffer_append(B, "]]></message>"); StringBuffer_append(B, "]]></message>");
if (E->source->token)
StringBuffer_append(B, "<token>%s</token>", E->source->token);
StringBuffer_append(B, "</event>"); StringBuffer_append(B, "</event>");
} }
/* ------------------------------------------------------------------ Public */ /* ------------------------------------------------------------------ Public */
/** /**
* Get a XML formatted message for event notification or general status * Get a XML formatted message for event notification or general status
* of monitored services and resources. * of monitored services and resources.
* @param E An event object or NULL for general status * @param E An event object or NULL for general status
* @param V Format version * @param V Format version
 End of changes. 4 change blocks. 
5 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)