off_t read_offset; //!< where we're reading from in filename_work
fr_event_timer_t const *ev; //!< for detail file timers.
+ RADCLIENT *client; //!< so the rest of the server doesn't complain
} proto_detail_work_t;
typedef struct proto_detail_process_t {
static int mod_decode(UNUSED void const *instance, REQUEST *request, UNUSED uint8_t *const data, UNUSED size_t data_len)
{
-// proto_detail_work_t const *inst = talloc_get_type_abort_const(instance, proto_detail_work_t);
+ proto_detail_work_t const *inst = talloc_get_type_abort_const(instance, proto_detail_work_t);
fr_detail_entry_t const *track = request->async->packet_ctx;
VALUE_PAIR *vp;
request->root = &main_config;
+ request->client = inst->client;
+
request->packet->id = track->id;
request->reply->id = track->id;
REQUEST_VERIFY(request);
static int mod_instantiate(void *instance, UNUSED CONF_SECTION *cs)
{
proto_detail_work_t *inst = talloc_get_type_abort(instance, proto_detail_work_t);
+ RADCLIENT *client;
FR_DLIST_INIT(inst->list);
+ client = inst->client = talloc_zero(inst, RADCLIENT);
+ if (!inst->client) return 0;
+
+ client->ipaddr.af = AF_INET;
+ client->ipaddr.addr.v4.s_addr = htonl(INADDR_NONE);
+ client->src_ipaddr = client->ipaddr;
+
+ client->longname = client->shortname = client->secret = inst->filename_work;
+ client->nas_type = talloc_strdup(client, "other");
+
return 0;
}