.config = module_config,
.bootstrap = mod_bootstrap,
.instantiate = mod_instantiate,
- .detach = mod_detach
+ .detach = mod_detach,
+ .thread_inst_size = sizeof(rlm_sql_thread_t),
},
.bindings = (module_method_binding_t[]){
/*
#include <freeradius-devel/server/pool.h>
#include <freeradius-devel/server/modpriv.h>
#include <freeradius-devel/server/exfile.h>
+#include <freeradius-devel/server/trunk.h>
#include <freeradius-devel/unlang/function.h>
#define FR_ITEM_CHECK 0
typedef struct sql_inst rlm_sql_t;
+/*
+ * Per-thread instance data structure
+ */
+typedef struct {
+ fr_trunk_t *trunk; //!< Trunk connection for this thread.
+ rlm_sql_t const *inst; //!< Module instance data.
+} rlm_sql_thread_t;
+
typedef struct {
void *conn; //!< Database specific connection handle.
rlm_sql_row_t row; //!< Row data from the last query.