Re: Bug: 2.5b7-5

Dale E. Reed Jr. ( (no email) )
Wed, 09 Sep 1998 13:42:08 -0700

Greg Boehnlein wrote:
>
> On Wed, 9 Sep 1998, Dale E. Reed Jr. wrote:
>
> > Greg Boehnlein wrote:
> > >
> > > Howdy,
> > > I tried to post this on Ants, but it wouldn't let me log in.
> > >
> > > On a fresh install of b-3 w/ b4 and b5 installed, the Online-Tab still
> > > does not show the Connect Info and Caller-ID. I believe this is due to a
> > > trigger that is missing.
> >
> > Ok. I updated the trigger to have the ConnectInfo and CallerID
> > update. I thought I had already done that. :(
>
> Any way you could post the relevant portion of the script? We're planning
> on using Emerald 2.5 as the auth/management platform for our V.90 testing
> with a seperate PRI here, and it would be very helpful to have that
> trigger in the database.

CREATE TRIGGER calls_insert ON dbo.Calls
FOR INSERT
AS
UPDATE ServerPorts
Set sp.UserName = i.UserName,
sp.AcctStatusType = i.AcctStatusType,
sp.CallDate = DateAdd(Second, 0-i.AcctDelayTime, i.CallDate),
sp.FramedAddress = i.FramedAddress,
sp.CallerID = i.CallerID,
sp.ConnectInfo = i.ConnectInfo
FROM Servers s, ServerPorts sp, inserted i
WHERE s.IPAddress = i.NASIdentifier AND
s.ServerID = sp.ServerID AND
sp.Port = i.NASPort AND
(DateAdd(Second, 0-i.AcctDelayTime, i.CallDate) >= sp.CallDate OR
sp.CallDate IS NULL)

UPDATE SubAccounts
Set sa.TimeLeft = sa.TimeLeft - (i.AcctSessionTime/60 +
1)
FROM SubAccounts sa, inserted i
WHERE sa.login = i.UserName
and sa.TimeLeft <> NULL
and i.AcctStatusType = 2
GO

-- Dale E. Reed Jr.  (daler@iea-software.com)_________________________________________________________________       IEA Software, Inc.      |  RadiusNT, Emerald, and NT FAQs Internet Solutions for Today  |   http://www.iea-software.com