From 764da5516796d49da156a4d56d26654ecb0db036 Mon Sep 17 00:00:00 2001 From: dev_amdtel Date: Wed, 30 Oct 2013 13:56:53 +0400 Subject: [PATCH] fixed calculation of PhoneNumbers/Ip quotas in AllocatePackage --- .../Servers/ServerController.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs index 7391b19d..50d3a2ae 100644 --- a/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs +++ b/WebsitePanel/Sources/WebsitePanel.EnterpriseServer.Code/Servers/ServerController.cs @@ -1249,10 +1249,13 @@ namespace WebsitePanel.EnterpriseServer int quotaUsed = cntx.Quotas[quotaName].QuotaUsedValue; // check the maximum allowed number - if (addressesNumber > (quotaAllocated - quotaUsed)) + if (quotaAllocated != -1) // check only if not unlimited { - res.ErrorCodes.Add("IP_ADDRESSES_QUOTA_LIMIT_REACHED"); - return res; + if (addressesNumber > (quotaAllocated - quotaUsed)) + { + res.ErrorCodes.Add("IP_ADDRESSES_QUOTA_LIMIT_REACHED"); + return res; + } } // check if requested more than available