git.asbjorn.biz
/
debian
/
dhcpd-pools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The xml output is dirty and marked as FIXME
[debian/dhcpd-pools.git]
/
src
/
getdata.c
diff --git
a/src/getdata.c
b/src/getdata.c
index
2fc1f5f
..
430468c
100644
(file)
--- a/
src/getdata.c
+++ b/
src/getdata.c
@@
-134,16
+134,16
@@
int parse_leases(void)
num_backups++;
}
num_backups++;
}
- if ((sw_active_lease == 1)
+ /* FIXME: move to output.c and use FILE *outfile */
+ if ((config.output_format[0] == 'X')
+ && (sw_active_lease == 1)
&& (strstr(line, "hardware ethernet"))) {
nth_field(3, macstring, line);
macstring[strlen(macstring) - 1] = '\0';
&& (strstr(line, "hardware ethernet"))) {
nth_field(3, macstring, line);
macstring[strlen(macstring) - 1] = '\0';
- if (config.output_format[0] == 'X') {
- printf
- ("<active_lease>\n\t<ip>%s</ip>\n\t<macaddress>%s</macaddress>\n</active_lease>\n",
- ipstring, macstring);
- };
+ printf
+ ("<active_lease>\n\t<ip>%s</ip>\n\t<macaddress>%s</macaddress>\n</active_lease>\n",
+ ipstring, macstring);
}
if ((leasesmallocsize < num_leases) ||
}
if ((leasesmallocsize < num_leases) ||