mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
yay, basic table assignment.
This commit is contained in:
parent
5b0c307f87
commit
b245d4168a
6 changed files with 87 additions and 8 deletions
|
@ -143,6 +143,21 @@ bool InputReaderAscii::DoUpdate() {
|
|||
val->val.string_val = new string(s);
|
||||
break;
|
||||
|
||||
case TYPE_BOOL:
|
||||
case TYPE_INT:
|
||||
val->val.int_val = atoi(s.c_str());
|
||||
break;
|
||||
|
||||
case TYPE_DOUBLE:
|
||||
case TYPE_TIME:
|
||||
case TYPE_INTERVAL:
|
||||
val->val.double_val = atof(s.c_str());
|
||||
break;
|
||||
|
||||
case TYPE_COUNT:
|
||||
val->val.uint_val = atoi(s.c_str());
|
||||
break;
|
||||
|
||||
default:
|
||||
Error(Fmt("unsupported field format %d for %s", currMapping.type,
|
||||
currMapping.name.c_str()));
|
||||
|
@ -163,6 +178,7 @@ bool InputReaderAscii::DoUpdate() {
|
|||
// for testing purposes: fixed event.
|
||||
|
||||
SendEvent("inputEvent", num_fields, fields);
|
||||
Put(fields);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue