Merge Request topic/mfischer/broker-fix

Description

Copied from git commit:

Fix for successive invocations of Broker::enable

When Broker::enable(flags) is called multiple times in Bro scriptland,
only the first invocation will cause that an endpoint is created and
that the endpoint flags will be set. Every successive invocation
will be ignored. This is bad in cases that you want to enable
additional flags, e.g., auto_publish or auto_routing, in a script that
is initialized later on.
The fix now simply checks for each invocation of Broker::enable(flags),
if an endpoint was already created and if yes it will check if the
flags have changed. If the new flags are different from the old ones,
the new flags will be set.

Environment

None

Activity

Show:
Johanna Amann
February 16, 2017, 11:26 AM

Two small questions/comments after taking a look:

  • would it perhaps make sense to add flags to the already existing flags when calling enable, instead of replacing them? Or do you think it is ok that the flags of the last call "win" in this case.

  • In any case, I think it would be nice to update the documentation of Broker::Enable to relfect what is going on here. Could you perhaps add that to the branch?

Johanna Amann
July 7, 2017, 3:12 AM

Can I just assume that this will no longer apply after the next round of broker updates and that we can close it?

Jon Siwek
November 18, 2017, 7:01 AM

This doesn't seem to apply any longer.

Rejected

Assignee

Mathias Fischer

Reporter

Mathias Fischer

Labels

None

External issue ID

None

Components

Fix versions

Affects versions

Priority

Normal