Hello Dmitry -

On Wed, 26 Jan 2000, Dmitry Niqiforoff wrote:
> Hello!
> 
>   Today I discovered a problem: Sometimes Acct Stop records coming
> BEFORE Acct Start records. This is a problem for me as soon as I use
> "radacct" database where each session stored in _one_ record. "Start"
> records inserted into database with "insert" SQL query, and "Stop"
> records inserted in the same record later with "update" SQL query. If
> "Stop" record appears before "Start", there is no records to update in
> database. Later, when "Start" record comes in, it will be inserted
> into database, but "Stop" record already lost :( So I have unfinished
> sessions.
>   The question is how to avoid this problem? Is it possible to check
> if "update" was successful and if not, perform "insert" SQL query?
> Something like "update blah-blah-blah || insert blah-blah-blah".
> 

Most people use AccountingStopsOnly for storing their accounting information,
as there are *always* problems trying to match Starts and Stops. Its an
unsolvable problem and the best way to deal with it is to avoid it altogether.
You will perhaps occassionally miss accounting for a session (if you don't get
a Stop), but its a far more efficient approach overall.

hth

Hugh

-- 
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody

===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to