remove nil protection for later testing

This commit is contained in:
Radu Ioan Fericean
2015-05-12 10:55:20 +03:00
parent 63bcc21a46
commit 73b587e3a0
2 changed files with 9 additions and 7 deletions

View File

@@ -1,8 +1,6 @@
export GOROOT=/root/go
export GOPATH=/root/code
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/redis/redis.conf /etc/mysql/my.cnf /etc/postgresql/9.4/main/pg_hba.conf
# edit servers config files
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/redis/redis.conf /etc/mysql/my.cnf
echo 'host all all 0.0.0.0/32 md5'>>/etc/postgresql/9.4/main/pg_hba.conf
/etc/init.d/mysql start
/etc/init.d/postgresql start
@@ -16,6 +14,9 @@ ln -s /root/code/src/github.com/cgrates/cgrates /root/cgr
cd /usr/share/cgrates/storage/mysql && ./setup_cgr_db.sh root CGRateS.org
cd /usr/share/cgrates/storage/postgres && ./setup_cgr_db.sh
#env vars
export GOROOT=/root/go; export GOPATH=/root/code; export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
# build and install cgrates
/root/cgr/update_external_libs.sh
go install github.com/cgrates/cgrates
@@ -28,4 +29,5 @@ cd /usr/share/cgrates/tutorials/fs_evsock/freeswitch/etc/ && tar xzf freeswitch_
cd /root/cgr
echo "for cgradmin run: cgr-engine -config_dir data/conf/samples/cgradmin"
echo 'export GOROOT=/root/go; export GOPATH=/root/code; export PATH=$PATH:$GOROOT/bin:$GOPATH/bin'>>/root/.zshrc
zsh

View File

@@ -420,10 +420,10 @@ func (b *Balance) DebitMoney(cd *CallDescriptor, ub *Account, count bool, dryRun
ts.createIncrementsSlice()
}
//log.Printf("TS: %+v", ts)
if ts.RateInterval == nil {
/*if ts.RateInterval == nil {
Logger.Err(fmt.Sprintf("Nil RateInterval ERROR on TS: %+v, CC: %+v, from CD: %+v", ts, cc, cd))
continue
}
}*/
maxCost, strategy := ts.RateInterval.GetMaxCost()
//log.Printf("Timing: %+v", ts.RateInterval.Timing)
//log.Printf("Rate: %+v", ts.RateInterval.Rating)