Remove code for XML serialization.

Code was apparently defunct and was not user-accessible for a long time.
This commit is contained in:
Johanna Amann 2016-08-05 14:02:28 -07:00
parent 30b40b214a
commit 39d811ff06
3 changed files with 6 additions and 332 deletions

View file

@ -204,9 +204,6 @@ void usage()
#ifdef USE_PERFTOOLS_DEBUG
fprintf(stderr, " -m|--mem-leaks | show leaks [perftools]\n");
fprintf(stderr, " -M|--mem-profile | record heap [perftools]\n");
#endif
#if 0 // Broken
fprintf(stderr, " -X <file.bst> | print contents of state file as XML\n");
#endif
fprintf(stderr, " --pseudo-realtime[=<speedup>] | enable pseudo-realtime for performance evaluation (default 1)\n");
@ -459,7 +456,6 @@ int main(int argc, char** argv)
int parse_only = false;
int bare_mode = false;
int dump_cfg = false;
int to_xml = 0;
int do_watchdog = 0;
int override_ignore_checksums = 0;
int rule_debug = 0;
@ -705,13 +701,6 @@ int main(int argc, char** argv)
break;
#endif
#if 0 // broken
case 'X':
bst_file = optarg;
to_xml = 1;
break;
#endif
#ifdef USE_IDMEF
case 'n':
fprintf(stderr, "Using IDMEF XML DTD from %s\n", optarg);
@ -1013,23 +1002,12 @@ int main(int argc, char** argv)
// Just read state file from disk.
if ( bst_file )
{
if ( to_xml )
{
BinarySerializationFormat* b =
new BinarySerializationFormat();
XMLSerializationFormat* x = new XMLSerializationFormat();
ConversionSerializer s(b, x);
s.Convert(bst_file, "/dev/stdout");
}
else
{
FileSerializer s;
UnserialInfo info(&s);
info.print = stdout;
info.install_uniques = true;
if ( ! s.Read(&info, bst_file) )
reporter->Error("Failed to read events from %s\n", bst_file);
}
FileSerializer s;
UnserialInfo info(&s);
info.print = stdout;
info.install_uniques = true;
if ( ! s.Read(&info, bst_file) )
reporter->Error("Failed to read events from %s\n", bst_file);
exit(0);
}