Return usage as 0 in case of errors on SMG.GetMaxUsage to cope with OpenSIPS

This commit is contained in:
DanB
2017-05-12 11:53:28 +02:00
parent eb0ed1f8a2
commit e3be7f9016

View File

@@ -1019,6 +1019,7 @@ func (smg *SMGeneric) CallBiRPC(clnt rpcclient.RpcClientConnection, serviceMetho
}
func (smg *SMGeneric) BiRPCV1GetMaxUsage(clnt rpcclient.RpcClientConnection, ev SMGenericEvent, maxUsage *float64) error {
*maxUsage = 0 // Bug in OpenSIPS, remove in the future
maxUsageDur, err := smg.GetMaxUsage(ev)
if err != nil {
return utils.NewErrServerError(err)