.request_fail = ldap_request_fail,
},
thread->trunk_conf,
- "rlm_ldap", found, false);
+ "rlm_ldap", found, false, thread->trigger_args);
if (!found->trunk) {
error:
.request_fail = ldap_trunk_bind_auth_fail,
},
thread->bind_trunk_conf,
- "rlm_ldap bind auth", ttrunk, false);
+ "rlm_ldap bind auth", ttrunk, false, thread->bind_trigger_args);
if (!ttrunk->trunk) {
ERROR("Unable to create LDAP connection");
*/
trunk_t *trunk_alloc(TALLOC_CTX *ctx, fr_event_list_t *el,
trunk_io_funcs_t const *funcs, trunk_conf_t const *conf,
- char const *log_prefix, void const *uctx, bool delay_start)
+ char const *log_prefix, void const *uctx, bool delay_start, fr_pair_list_t *trigger_args)
{
trunk_t *trunk;
size_t i;
MEM(trunk = talloc_zero(ctx, trunk_t));
trunk->el = el;
trunk->log_prefix = talloc_strdup(trunk, log_prefix);
+ trunk->trigger_args = trigger_args;
memcpy(&trunk->funcs, funcs, sizeof(trunk->funcs));
if (!trunk->funcs.connection_prioritise) {
int trunk_connection_manage_schedule(trunk_t *trunk) CC_HINT(nonnull);
-trunk_t *trunk_alloc(TALLOC_CTX *ctx, fr_event_list_t *el,
+trunk_t *trunk_alloc(TALLOC_CTX *ctx, fr_event_list_t *el,
trunk_io_funcs_t const *funcs, trunk_conf_t const *conf,
- char const *log_prefix, void const *uctx, bool delay_start) CC_HINT(nonnull(2, 3, 4));
+ char const *log_prefix, void const *uctx, bool delay_start,
+ fr_pair_list_t *trigger_args) CC_HINT(nonnull(2, 3, 4));
/** @} */
/** @name Watchers
*/
if (with_cancel_mux) io_funcs.request_cancel_mux = test_cancel_mux;
- return trunk_alloc(ctx, el, &io_funcs, conf, "test_socket_pair", uctx, false);
+ return trunk_alloc(ctx, el, &io_funcs, conf, "test_socket_pair", uctx, false, NULL);
}
static void test_socket_pair_alloc_then_free(void)
fr_timer_list_set_time_func(el->tl, test_time);
- trunk = trunk_alloc(ctx, el, &io_funcs, &conf, "test_socket_pair", NULL, false);
+ trunk = trunk_alloc(ctx, el, &io_funcs, &conf, "test_socket_pair", NULL, false, NULL);
TEST_CHECK(trunk != NULL);
if (!trunk) return;
fr_timer_list_set_time_func(el->tl, test_time);
- trunk = trunk_alloc(ctx, el, &io_funcs, &conf, "test_socket_pair", NULL, false);
+ trunk = trunk_alloc(ctx, el, &io_funcs, &conf, "test_socket_pair", NULL, false, NULL);
TEST_CHECK(trunk != NULL);
if (!trunk) return;
fr_timer_list_set_time_func(el->tl, test_time);
- trunk = trunk_alloc(ctx, el, &io_funcs, &conf, "test_socket_pair", NULL, false);
+ trunk = trunk_alloc(ctx, el, &io_funcs, &conf, "test_socket_pair", NULL, false, NULL);
TEST_CHECK(trunk != NULL);
if (!trunk) return;
el = fr_event_list_alloc(ctx, NULL, NULL);
fr_timer_list_set_time_func(el->tl, test_time);
- trunk = trunk_alloc(ctx, el, &io_funcs, &conf, "test_socket_pair", NULL, false);
+ trunk = trunk_alloc(ctx, el, &io_funcs, &conf, "test_socket_pair", NULL, false, NULL);
TEST_CHECK(trunk != NULL);
if (!trunk) return;
}
thread->ctx.trunk = trunk_alloc(thread, mctx->el, &io_funcs,
- &inst->trunk_conf, inst->name, thread, false);
+ &inst->trunk_conf, inst->name, thread, false, inst->trigger_args);
if (!thread->ctx.trunk) return -1;
return 0;
if (inst->fd_config.socket_type == SOCK_DGRAM) break;
thread->ctx.trunk = trunk_alloc(thread, mctx->el, &io_replicate_funcs,
- &inst->trunk_conf, inst->name, thread, false);
+ &inst->trunk_conf, inst->name, thread, false, inst->trigger_args);
if (!thread->ctx.trunk) return -1;
return 0;
* Allocate the trunk and start it up.
*/
home->ctx.trunk = trunk_alloc(home, unlang_interpret_event_list(request), &io_funcs,
- &inst->trunk_conf, inst->name, home, false);
+ &inst->trunk_conf, inst->name, home, false, inst->trigger_args);
if (!home->ctx.trunk) {
fail:
talloc_free(home);
t->inst = inst;
t->trunk = trunk_alloc(t, mctx->el, &inst->driver->trunk_io_funcs,
- &inst->config.trunk_conf, inst->name, t, false);
+ &inst->config.trunk_conf, inst->name, t, false, inst->trigger_args);
if (!t->trunk) return -1;
return 0;
thread->el = mctx->el;
thread->inst = inst;
thread->trunk = trunk_alloc(thread, mctx->el, &io_funcs,
- &inst->parent->trunk_conf, inst->parent->name, thread, false);
+ &inst->parent->trunk_conf, inst->parent->name, thread, false, inst->trigger_args);
if (!thread->trunk) return -1;
return 0;