Two connection pools in one module.

Arran Cudbard-Bell a.cudbardb at
Wed Jul 6 18:01:33 CEST 2016

> On 6 Jul 2016, at 11:56, Matthew Newton <mcn4 at> wrote:
> On Wed, Jul 06, 2016 at 03:21:00PM +0000, Ленченко Илья Анатольевич wrote:
>> {
>>  rlm_smt_t *inst = instance;
>>  inst->poolMYSQL = fr_connection_pool_module_init(conf, inst, mod_conn_create_mysql, NULL, NULL);
>>  if (!inst->poolMYSQL) {
>>    return -1;
>>  }
>> inst->poolRabbitMQ = fr_connection_pool_module_init(conf, inst, mod_conn_create_rmq, NULL, NULL);
>> if (!inst->poolRabbitMQ) {
>>   return -1;
>> }
> Using the same 'conf' for each one doesn't look good to me.

Yeah that code will assume you're doing connection pool sharing, and just pass back the same pointer.

... and no, we're not going to change that, it's a valid assumption.

No other module uses multiple connection pools that draw their configuration from the same subsection,
because why would you, when you have a policy language to allow interactions between modules...


Arran Cudbard-Bell <a.cudbardb at>
FreeRADIUS Development Team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 872 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <>

More information about the Freeradius-Devel mailing list