updated api

This commit is contained in:
Radu Ioan Fericean
2012-02-27 14:51:39 +02:00
parent 79a264b974
commit ebf10d0fc8

View File

@@ -45,7 +45,7 @@ RPC method providing the rating information from the storage.
*/
func (s *Storage) GetCost(cd timespans.CallDescriptor, reply *timespans.CallCost) (err error) {
descriptor := &cd
descriptor.StorageGetter = s.sg
descriptor.SetStorageGetter(s.sg)
r, e := descriptor.GetCost()
*reply, err = *r, e
return err
@@ -53,7 +53,7 @@ func (s *Storage) GetCost(cd timespans.CallDescriptor, reply *timespans.CallCost
func (s *Storage) DebitCents(cd timespans.CallDescriptor, reply *float64) (err error) {
descriptor := &cd
descriptor.StorageGetter = s.sg
descriptor.SetStorageGetter(s.sg)
r, e := descriptor.DebitCents()
*reply, err = r, e
return err
@@ -61,7 +61,7 @@ func (s *Storage) DebitCents(cd timespans.CallDescriptor, reply *float64) (err e
func (s *Storage) DebitSMS(cd timespans.CallDescriptor, reply *float64) (err error) {
descriptor := &cd
descriptor.StorageGetter = s.sg
descriptor.SetStorageGetter(s.sg)
r, e := descriptor.DebitSMS()
*reply, err = r, e
return err
@@ -69,7 +69,7 @@ func (s *Storage) DebitSMS(cd timespans.CallDescriptor, reply *float64) (err err
func (s *Storage) DebitSeconds(cd timespans.CallDescriptor, reply *float64) (err error) {
descriptor := &cd
descriptor.StorageGetter = s.sg
descriptor.SetStorageGetter(s.sg)
e := descriptor.DebitSeconds()
*reply, err = 0.0, e
return err
@@ -77,7 +77,7 @@ func (s *Storage) DebitSeconds(cd timespans.CallDescriptor, reply *float64) (err
func (s *Storage) GetMaxSessionTime(cd timespans.CallDescriptor, reply *float64) (err error) {
descriptor := &cd
descriptor.StorageGetter = s.sg
descriptor.SetStorageGetter(s.sg)
r, e := descriptor.GetMaxSessionTime()
*reply, err = r, e
return err