mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Incremental
This commit is contained in:
parent
be5cb549a9
commit
6055b56f5c
3 changed files with 114 additions and 122 deletions
16
src/Func.cc
16
src/Func.cc
|
@ -268,18 +268,14 @@ ValWrapper* Func::HandlePluginResult(ValWrapper* plugin_result, val_list* args,
|
|||
case FUNC_FLAVOR_EVENT:
|
||||
if(plugin_result->value)
|
||||
{
|
||||
char sbuf[1024];
|
||||
snprintf(sbuf, 1024, "plugin returned non-void result for event %s", this->Name());
|
||||
reporter->InternalError(sbuf);
|
||||
reporter->InternalError("plugin returned non-void result for event %s", this->Name());
|
||||
}
|
||||
break;
|
||||
|
||||
case FUNC_FLAVOR_HOOK:
|
||||
if ( plugin_result->value->Type()->Tag() != TYPE_BOOL )
|
||||
{
|
||||
char sbuf[1024];
|
||||
snprintf(sbuf, 1024, "plugin returned non-bool for hook %s", this->Name());
|
||||
reporter->InternalError(sbuf);
|
||||
reporter->InternalError("plugin returned non-bool for hook %s", this->Name());
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -291,16 +287,12 @@ ValWrapper* Func::HandlePluginResult(ValWrapper* plugin_result, val_list* args,
|
|||
{
|
||||
if(plugin_result && plugin_result->value)
|
||||
{
|
||||
char sbuf[1024];
|
||||
snprintf(sbuf, 1024, "plugin returned non-void result for void method %s", this->Name());
|
||||
reporter->InternalError(sbuf);
|
||||
reporter->InternalError("plugin returned non-void result for void method %s", this->Name());
|
||||
}
|
||||
}
|
||||
else if ( plugin_result->value && plugin_result->value->Type()->Tag() != yt->Tag() && yt->Tag() != TYPE_ANY)
|
||||
{
|
||||
char sbuf[1024];
|
||||
snprintf(sbuf, 1024, "plugin returned wrong type (got %d, expecting %d) for %s", plugin_result->value->Type()->Tag(), yt->Tag(), this->Name());
|
||||
reporter->InternalError(sbuf);
|
||||
reporter->InternalError("plugin returned wrong type (got %d, expecting %d) for %s", plugin_result->value->Type()->Tag(), yt->Tag(), this->Name());
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue