In bifs, change ODesc objects to have RAW_STYLE.

This prevents double-escaping with the logging changes of BIT-1333.
This commit is contained in:
Robin Sommer 2015-04-16 20:40:47 -07:00
parent 7344052b50
commit 7225221c2a
6 changed files with 23 additions and 5 deletions

View file

@ -16,6 +16,7 @@ event bro_init()
{
local a = "abc\0def";
local b = escape_string(a);
local c = fmt("%s", a);
Log::create_stream(Test::LOG, [$columns=Log]);
Log::write(Test::LOG, [$s="AB\0CD\0"]);
@ -24,6 +25,8 @@ event bro_init()
Log::write(Test::LOG, [$s=" "]);
Log::write(Test::LOG, [$s=b]);
Log::write(Test::LOG, [$s=" "]);
Log::write(Test::LOG, [$s=c]);
Log::write(Test::LOG, [$s=" "]);
Log::write(Test::LOG, [$s="foo \xc2\xae bar \\xc2\\xae baz"]);
Log::write(Test::LOG, [$s="foo\x00bar\\0baz"]);
Log::write(Test::LOG, [$s="foo \16 bar ^N baz"]);
@ -34,6 +37,8 @@ event bro_init()
print "";
print b;
print "";
print c;
print "";
print "foo \xc2\xae bar \\xc2\\xae baz";
print "foo\x00bar\\0baz";
print "foo \16 bar ^N baz";