mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-17 06:09:53 +05:00
fix for smggenreic nil pointer
This commit is contained in:
@@ -237,9 +237,14 @@ func (self *SMGeneric) ChargeEvent(gev SMGenericEvent, clnt *rpc2.Client) (maxDu
|
||||
}
|
||||
var withErrors bool
|
||||
for _, sR := range sessionRuns {
|
||||
var cc *engine.CallCost
|
||||
for _, ccSR := range sR.CallCosts {
|
||||
cc.Merge(ccSR)
|
||||
if len(sR.CallCosts) == 0 {
|
||||
continue
|
||||
}
|
||||
cc := sR.CallCosts[0]
|
||||
if len(sR.CallCosts) > 1 {
|
||||
for _, ccSR := range sR.CallCosts[1:] {
|
||||
cc.Merge(ccSR)
|
||||
}
|
||||
}
|
||||
var reply string
|
||||
if err := self.cdrsrv.LogCallCost(&engine.CallCostLog{
|
||||
|
||||
Reference in New Issue
Block a user