Hi Raphael, Good point you raise: legacy is never a good reason but that's the reason; ideally amqp_user and amqp_passwd should be added to the configuration struct in cfg.h and all should be pointed to those. It's the same for a few other cases (not many fortunately), like the output filename of the print plugin that uses config.sql_table. It's a number of code cleanups that i have on my todo list. Their impact is minor: all works well unless, as part of the same configuration, one does not cast, say, co-existing sql_user and amqp_user directives, ie.:
.. plugins: amqp[a], mysql[b] sql_user: foo amqp_user: bar .. In this case 'bar' would be used also as sql_user for the MySQL plugin; if, instead, directives are casted properly, ie.: .. plugins: amqp[a], mysql[b] sql_user[a]: foo amqp_user[b]: bar .. Then all would work perfect. All in all, something to be fixed. Cheers, Paolo On Tue, Mar 01, 2016 at 05:43:42PM +0100, Raphael Mazelier wrote: > Hello, > > I'm experimenting amqp plugin with pmacct. > I'm wondering why amqp plugin use sql config/user pass ? > > Grepping in the source code : > > amqp_plugin.c: if (!config.sql_passwd) config.sql_passwd = rabbitmq_pwd; > amqp_plugin.c: p_amqp_set_passwd(&amqpp_amqp_host, config.sql_passwd); > > Is there a good reason ? or is this just a typo ? > > Regards, > > -- > Raphael Mazelier > > _______________________________________________ > pmacct-discussion mailing list > http://www.pmacct.net/#mailinglists _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists