mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Removed warnings from go staticcheck
This commit is contained in:
committed by
Dan Christian Bogos
parent
529430bd4d
commit
c2dacc42c1
@@ -246,7 +246,7 @@ func (ka *KamailioAgent) onCallEnd(evData []byte, connIdx int) {
|
||||
utils.KamailioAgent, kev[utils.OriginID], err.Error()))
|
||||
// no return here since we want CDR anyhow
|
||||
}
|
||||
if ka.cfg.CreateCdr || strings.Index(kev[utils.CGRFlags], utils.MetaCDRs) != -1 {
|
||||
if ka.cfg.CreateCdr || strings.Contains(kev[utils.CGRFlags], utils.MetaCDRs) {
|
||||
if err := ka.connMgr.Call(ka.ctx, ka.cfg.SessionSConns,
|
||||
utils.SessionSv1ProcessCDR,
|
||||
tsArgs.CGREvent, &reply); err != nil {
|
||||
|
||||
@@ -34,9 +34,7 @@ func newDnsReply(req *dns.Msg) (rply *dns.Msg) {
|
||||
rply.SetReply(req)
|
||||
if len(req.Question) > 0 {
|
||||
rply.Question = make([]dns.Question, len(req.Question))
|
||||
for i, q := range req.Question {
|
||||
rply.Question[i] = q
|
||||
}
|
||||
copy(rply.Question, req.Question)
|
||||
}
|
||||
if opts := rply.IsEdns0(); opts != nil {
|
||||
rply.SetEdns0(4096, false).IsEdns0().Option = opts.Option
|
||||
|
||||
Reference in New Issue
Block a user