mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
replaced sched_hangup with sched_transfer
This commit is contained in:
committed by
Dan Christian Bogos
parent
e194979b99
commit
c233daef58
@@ -2494,7 +2494,7 @@ func (sS *SessionS) BiRPCv1InitiateSession(ctx *context.Context,
|
||||
hasDebitLoops := s.debitStop != nil
|
||||
s.RUnlock()
|
||||
if hasDebitLoops { //active debit
|
||||
rply.MaxUsage = utils.DurationPointer(sS.cgrCfg.SessionSCfg().GetDefaultUsage(utils.IfaceAsString(args.CGREvent.Event[utils.ToR])))
|
||||
rply.MaxUsage = utils.DurationPointer(-1)
|
||||
} else {
|
||||
var sRunsUsage map[string]time.Duration
|
||||
if sRunsUsage, err = sS.updateSession(s, nil, args.APIOpts, false); err != nil {
|
||||
|
||||
@@ -202,7 +202,7 @@ func testSessionsBiRPCSessionAutomaticDisconnects(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
time.Sleep(10 * time.Millisecond) // give some time to allow the session to be created
|
||||
expMaxUsage := 3 * time.Hour // MaxCallDuration from config
|
||||
expMaxUsage := time.Duration(-1) // MaxCallDuration from config
|
||||
if initRpl.MaxUsage == nil || *initRpl.MaxUsage != expMaxUsage {
|
||||
t.Errorf("Expecting : %+v, received: %+v", expMaxUsage, initRpl.MaxUsage)
|
||||
}
|
||||
@@ -324,7 +324,7 @@ func testSessionsBiRPCSessionOriginatorTerminate(t *testing.T) {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
expMaxUsage := 3 * time.Hour // MaxCallDuration from config
|
||||
expMaxUsage := time.Duration(-1) // MaxCallDuration from config
|
||||
if initRpl.MaxUsage == nil || *initRpl.MaxUsage != expMaxUsage {
|
||||
t.Errorf("Expecting : %+v, received: %+v", expMaxUsage, initRpl.MaxUsage)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user