mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 15:48:44 +05:00
Move populating source after RPC caching
This commit is contained in:
committed by
Dan Christian Bogos
parent
7e77f1fa35
commit
65b0e0f608
@@ -2550,9 +2550,6 @@ func (sS *SessionS) BiRPCv1ProcessCDR(clnt rpcclient.RpcClientConnection,
|
||||
if cgrEvWithArgDisp.ID == "" {
|
||||
cgrEvWithArgDisp.ID = utils.GenUUID()
|
||||
}
|
||||
if _, has := cgrEvWithArgDisp.Event[utils.Source]; !has {
|
||||
cgrEvWithArgDisp.Event[utils.Source] = utils.MetaSessionS
|
||||
}
|
||||
|
||||
// RPC caching
|
||||
if sS.cgrCfg.CacheCfg()[utils.CacheRPCResponses].Limit != 0 {
|
||||
@@ -2573,6 +2570,10 @@ func (sS *SessionS) BiRPCv1ProcessCDR(clnt rpcclient.RpcClientConnection,
|
||||
nil, true, utils.NonTransactional)
|
||||
}
|
||||
// end of RPC caching
|
||||
// in case that source don't exist add it
|
||||
if _, has := cgrEvWithArgDisp.Event[utils.Source]; !has {
|
||||
cgrEvWithArgDisp.Event[utils.Source] = utils.MetaSessionS
|
||||
}
|
||||
|
||||
ev := engine.NewSafEvent(cgrEvWithArgDisp.Event)
|
||||
cgrID := GetSetCGRID(ev)
|
||||
|
||||
Reference in New Issue
Block a user