From: Alan T. DeKok Date: Fri, 23 Jun 2017 13:41:36 +0000 (-0400) Subject: set server_cs from listener X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e01eafb4460fe62043fd5579457c83df611e91d1;p=thirdparty%2Ffreeradius-server.git set server_cs from listener --- diff --git a/src/lib/io/listen.h b/src/lib/io/listen.h index 68a781f20f9..4bef7e343a1 100644 --- a/src/lib/io/listen.h +++ b/src/lib/io/listen.h @@ -30,6 +30,8 @@ struct fr_listen { fr_app_t const *app; void const *app_instance; + CONF_SECTION *server_cs; //!< CONF_SECTION of the server + size_t default_message_size; //!< copied from app_io, but may be changed size_t num_messages; //!< for the message ring buffer }; diff --git a/src/lib/io/worker.c b/src/lib/io/worker.c index cc7e3b1cfcb..679d540e0a9 100644 --- a/src/lib/io/worker.c +++ b/src/lib/io/worker.c @@ -685,6 +685,8 @@ static REQUEST *fr_worker_get_request(fr_worker_t *worker, fr_time_t now) rad_assert(request->reply != NULL); request->async = talloc_zero(request, fr_async_t); + request->server_cs = cd->listen->server_cs; + request->server = cf_section_name2(request->server_cs); /* * Receive a message to the worker queue, and decode it diff --git a/src/modules/proto_radius/proto_radius.c b/src/modules/proto_radius/proto_radius.c index a46ec8eaf29..230146dcdd1 100644 --- a/src/modules/proto_radius/proto_radius.c +++ b/src/modules/proto_radius/proto_radius.c @@ -268,6 +268,7 @@ static int mod_open(void *instance, fr_schedule_t *sc, CONF_SECTION *conf) listen->app = &proto_radius; listen->app_instance = instance; + listen->server_cs = inst->server_cs; /* * Set configurable parameters for message ring buffer.