diff --git a/cmd/rater/rater.go b/cmd/rater/rater.go index ee8f2b2ea..5aefe6efe 100644 --- a/cmd/rater/rater.go +++ b/cmd/rater/rater.go @@ -26,9 +26,9 @@ func NewStorage(nsg timeslots.StorageGetter) *Storage{ /* RPC method providing the rating information from the storage. */ -func (s *Storage) GetCost(in *timeslots.CallDescription, reply *CallCost) (error) { +func (s *Storage) GetCost(in *timeslots.CallDescription, reply *timeslots.CallCost) (err error) { r, e := timeslots.GetCost(in, s.sg) - *replay, err = r, e + *reply, err = *r, e return e } diff --git a/timeslots/timeslots.go b/timeslots/timeslots.go index c7851a4f1..b7175a0a2 100644 --- a/timeslots/timeslots.go +++ b/timeslots/timeslots.go @@ -38,12 +38,12 @@ type CallDescription struct { type CallCost struct { TOR int - CstmId, Subjext, Prefix string + CstmId, Subject, Prefix string Cost, ConnectFee float32 // ratesInfo *RatingProfile } func GetCost(in *CallDescription, sg StorageGetter) (result *CallCost, err error) { - return &CallCost{TOR: 1, CstmId:"",Subjext:"",Prefix:"", Cost:1, ConnectFee:1}, nil + return &CallCost{TOR: 1, CstmId:"",Subject:"", Prefix:"", Cost:1, ConnectFee:1}, nil } diff --git a/timeslots/timeslots_test.go b/timeslots/timeslots_test.go index 496cc2cbf..03182aea8 100644 --- a/timeslots/timeslots_test.go +++ b/timeslots/timeslots_test.go @@ -9,7 +9,7 @@ func TestSimple(t *testing.T){ if err != nil { t.Error("Got error on getting cost") } - expected:= &CallCost{TOR: 1, CstmId:"",Subjext:"",Prefix:"", Cost:1, ConnectFee:1} + expected:= &CallCost{TOR: 1, CstmId:"",Subject:"",Prefix:"", Cost:1, ConnectFee:1} if *cc != *expected { t.Errorf("Expected %v got %v", expected, cc) }