CONF_SECTION *trigger_cs; //!< Where to search locally for triggers.
fr_pair_list_t *trigger_args; //!< Arguments to pass to the trigger functions.
+ bool triggers; //!< Do we run triggers.
};
#define CONN_TRIGGER(_state) do { \
- trigger(unlang_interpret_get_thread_default(), \
+ if (conn->triggers) trigger(unlang_interpret_get_thread_default(), \
conn->trigger_cs, fr_table_str_by_value(connection_trigger_names, _state, "<INVALID>"), true, conn->trigger_args); \
} while (0)
.failed = funcs->failed,
.shutdown = funcs->shutdown,
.is_closed = true, /* Starts closed */
+ .triggers = conf->triggers,
.trigger_args = conf->trigger_args,
.trigger_cs = conf->trigger_cs,
.pub.name = talloc_asprintf(conn, "%s - [%" PRIu64 "]", log_prefix, id)
fr_pair_list_t *trigger_args; //!< Additional pairs to pass to the trigger function
///< Lifetime must be longer than the connection.
+
+ bool triggers; //!< Do we run triggers.
} connection_conf_t;
typedef struct connection_watch_entry_s connection_watch_entry_t;