> From: Nicolas Baradakis > Sent: Monday, 22 September 2003 11:48 PM > Paul Hampson wrote: > > > > 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. > mySQL provides a mysql_free_result() that you're supposed to call > after a mysql_store_result(). > > So I'm thinking that: > > * sql_select_query() calls mysql_store_result() and therefore > sql_finish_select_query() calls mysql_free_result() > > * sql_query() don't allocate supplementary resources so > sql_finish_query() does nothing and it's just fine. > > Moreover (now that I read the entire source code) if you really want > to call sql_finish_query() after a failed sql_query() I think the best > place to do it is the function rlm_sql_query() in sql.c and not in a > lot of different places in rlm_sql.c Bah. More reading to do before I can buy fully into or out of that one. (It makes a tempting kind of sense... Do we want the callers of rlm_sql_query to only have to call sql_finish_query on successful queries? I suspect so.) > Since this issue has nothing to do with rlm_sql_postauth() I think > you could safely commit the patch now. Now that I go to do that, I find even the attached version has barfed. I hope this isn't pscp doing something whacky. :-( Oh, turns out _something's_ doing something whacky... ASCII-mode ftp upload from Win32 to Linux fixed the patch... Comitted. At last. :-) -- ========================================================= 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