[Bro] Trouble passing a message between two local endpoints.

Siwek, Jon jsiwek at illinois.edu
Fri Aug 14 07:57:01 PDT 2015

> On Aug 13, 2015, at 8:52 PM, David Banas <capn.freako at gmail.com> wrote:
>     broker_deque_of_message* msg_list = broker_message_queue_want_pop(q);

This ends up checking for messages while the one you just sent is still in-flight.  Try changing it to use “broker_message_queue_need_pop(q)”.  That version will block until at least one message can be retrieved from the queue.

Alternatively, what you may want in a real application is integrate the “want_pop” version into a poll()/select() loop so you get signaled when something is actually available to retrieve.

- Jon

More information about the Bro mailing list