Add reason_ttl attribute for host/status output

This commit is contained in:
dmiller 2012-07-20 21:44:57 +00:00
parent 4eb88d2cde
commit 5b5ca64126
2 changed files with 3 additions and 1 deletions

View file

@ -153,7 +153,8 @@
<!-- these elements are written by output.c:write_xml_initial_hostinfo() -->
<!ELEMENT status EMPTY >
<!ATTLIST status state %host_states; #REQUIRED
reason CDATA #REQUIRED
reason CDATA #REQUIRED
reason_ttl CDATA #REQUIRED
>
<!ELEMENT address EMPTY >

View file

@ -1272,6 +1272,7 @@ static void write_xml_initial_hostinfo(Target *currenths,
xml_open_start_tag("status");
xml_attribute("state", "%s", status);
xml_attribute("reason", "%s", reason_str(currenths->reason.reason_id, SINGULAR));
xml_attribute("reason_ttl", "%d", currenths->reason.ttl);
xml_close_empty_tag();
xml_newline();
xml_open_start_tag("address");