better update queues

This commit is contained in:
Radu Ioan Fericean
2014-08-01 21:25:39 +03:00
parent 3fcf8716e0
commit 5496a0eae2
2 changed files with 4 additions and 1 deletions

View File

@@ -76,6 +76,9 @@ type CdrStats struct {
}
func (cs *CdrStats) AcceptCdr(cdr *utils.StoredCdr) bool {
if cdr == nil {
return false
}
if len(cs.SetupInterval) > 0 {
if cdr.SetupTime.Before(cs.SetupInterval[0]) {
return false

View File

@@ -148,7 +148,7 @@ func (s *Stats) UpdateQueues(css []*CdrStats, out *int) error {
var existing bool
if oldQueues != nil {
if sq, existing = oldQueues[cs.Id]; existing {
sq.conf = cs
sq.UpdateConf(cs)
}
}
if sq == nil {