When we have a stop record, don't compare it to unused entries.
authoraland <aland>
Mon, 5 Jan 2004 17:05:09 +0000 (17:05 +0000)
committeraland <aland>
Mon, 5 Jan 2004 17:05:09 +0000 (17:05 +0000)
This means that if we get two duplicate stops, the second one will
cause the server to complain.  Previously, the server *may* have
complained, but not necessarily...

src/modules/rlm_radutmp/rlm_radutmp.c

index e4be7c7..a81ec10 100644 (file)
@@ -458,6 +458,14 @@ static int radutmp_accounting(void *instance, REQUEST *request)
                    u.nas_port    != ut.nas_port)
                        continue;
                
+               /*
+                *      Don't compare stop records to unused entries.
+                */
+               if (status == PW_STATUS_STOP &&
+                   u.type == P_IDLE) {
+                       continue;
+               }
+
                if (status == PW_STATUS_STOP &&
                    strncmp(ut.session_id, u.session_id,
                            sizeof(u.session_id)) != 0) {