mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
Converting log writers and input readers to plugins.
This commit is contained in:
parent
6d9e261384
commit
f4cbcb9b03
109 changed files with 1177 additions and 495 deletions
15
src/Type.cc
15
src/Type.cc
|
@ -1476,10 +1476,19 @@ void EnumType::CheckAndAddName(const string& module_name, const char* name,
|
|||
}
|
||||
else
|
||||
{
|
||||
// We allow double-definitions if matching exactly. This is
|
||||
// so that we can define an enum both in a *.bif and *.bro to
|
||||
// avoid cyclic dependencies.
|
||||
if ( id->Name() != make_full_var_name(module_name.c_str(), name)
|
||||
|| (id->HasVal() && val != id->ID_Val()->AsEnum()) )
|
||||
{
|
||||
Unref(id);
|
||||
reporter->Error("identifier or enumerator value in enumerated type definition already exists");
|
||||
SetError();
|
||||
return;
|
||||
}
|
||||
|
||||
Unref(id);
|
||||
reporter->Error("identifier or enumerator value in enumerated type definition already exists");
|
||||
SetError();
|
||||
return;
|
||||
}
|
||||
|
||||
AddNameInternal(module_name, name, val, is_export);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue