Hello Timophey,

Friday, April 05, 2002, 4:16:42 PM, you wrote:

T> Hi all.

T> I faced with a problem on FR 0.5:

T> when using FR 0.4 I have my a single record for both Start and STOP
T> accounting requests.
T> Since I have changed to FR 0.5 my accounting records double with stop of the
T> session.

[del]

Try the following patch, I it's correct now.
It seems like a bug in postgresql module for using PQntuples and PQcmdTuples
that I try to fix earler, but incorrect patch was posted by me, and I
don't use accounting_stop_query_alt, sorry!

--- sql_postgresql.c    Fri Apr  5 17:30:50 2002
+++ sql_postgresql.c.new        Fri Apr  5 17:21:57 2002
@@ -170,7 +170,7 @@
                        /* store the number of affected rows because the sql module
                         * calls finish_query before it retrieves the number of 
affected
                         * rows from the driver */
-                       pg_sock->affected_rows = PQntuples(pg_sock->result);
+                       pg_sock->affected_rows = affected_rows(pg_sock->result);
                        return 0;
                } else {
                        if ((sql_store_result(sqlsocket, config) == 0)
@@ -207,7 +207,7 @@
        rlm_sql_postgres_sock *pg_sock = sqlsocket->conn;
 
        pg_sock->cur_row = 0;
-       pg_sock->affected_rows = affected_rows(pg_sock->result);
+       pg_sock->affected_rows = PQntuples(pg_sock->result);
        return 0;
 }


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

Reply via email to