> From: Nicolas Baradakis
> Sent: Monday, 22 September 2003 1:30 AM

> Paul Hampson wrote:

> > > > > With one minor change, to call
> > > > > (inst->module->sql_finish_query)(sqlsocket, inst->config);
> > > > > even for failed queries. (As is done in _some_ of the other
> > > > > sql_ function in rlm_sql.c. And PostgresSQL's docs also do
> > > > > it... Only postgres and Sybase (off hand, Oracle too maybe)
> > > > > actually implement the function anyway.

> > > I don't understand. There is a return RLM_MODULE_FAIL just above,
> > > so sql_finish_query() is not called on failed query.

> > That's my point. My reading says it _should_ be. This certainly
> > needs to be cleaned up in other places too.

> I'm sorry, I've completely misunderstood your previous post.

> The fact is it's unclear when you should call sql_finish_query().
> Looking more closely at rlm_sql.c I observed that:
> (i) after a failed rlm_sql_query() there no call to sql_finish_query()
> except in rlm_sql_accounting()
> (ii) sql_finish_query() may sometimes be called 2 times (see lines 812
> and 815 for example)

> I think it'd be better to have a separate patch to fix
> sql_finish_query() usage everywhere and not only in
> rlm_sql_postauth()

SOunds good. Are you going to make it call it always? I expect
such a function would be safe to call at any time... From memory,
the mySQL provides such a function, but its not implemented in
rlm_sql_mysql at the moment. I'll also have to look into that
sometime.

--
=========================================================
Paul "TBBle" Hampson
Bubblesworth Pty Ltd (ABN: 51 095 284 361)
[EMAIL PROTECTED]

On a sidewalk near Portland State
University someone wrote `Trust Jesus', and
someone else wrote `But Cut the Cards'.
---------------------------------------------------------
Random signature generator 3.0 by Paul "TBBle" Hampson
=========================================================


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to