When some messages must be sent to an agent, the SPOE context of the stream is
queued to be handled by an SPOE applet. If there is no available applet, a new
one is created, thus opening a connection with the agent.
Since the support of ACLs on messages, some processing can now be discarded. So,
to avoid opening a connection for nothing, the SPOE context is now queued after
the messages encoding.
if (!ret)
goto out;
- if (spoe_queue_context(ctx) < 0)
- goto error;
-
ctx->state = SPOE_CTX_ST_ENCODING_MSGS;
/* fall through */
}
goto error;
if (!ret)
goto skip;
+ if (spoe_queue_context(ctx) < 0)
+ goto error;
ctx->state = SPOE_CTX_ST_SENDING_MSGS;
}