From 4d8967deafcdd29f23dd50c49b2115efb920dd58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Wed, 4 Jul 2012 18:18:39 +0200 Subject: [PATCH] Feature #1288: Fix bug introduced in commit:77452c86, quotas were only checked for the first image or vnet found (cherry picked from commit 564502fe6a3d85877be59c36fa6980f5d3da5e0c) --- src/um/QuotaImage.cc | 5 ++++- src/um/QuotaNetwork.cc | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/um/QuotaImage.cc b/src/um/QuotaImage.cc index ea0b15eb7c..cd0a584734 100644 --- a/src/um/QuotaImage.cc +++ b/src/um/QuotaImage.cc @@ -53,7 +53,10 @@ bool QuotaImage::check(Template * tmpl, string& error) if ( !image_id.empty() ) { - return check_quota(image_id, image_request, error); + if ( !check_quota(image_id, image_request, error) ) + { + return false; + } } } diff --git a/src/um/QuotaNetwork.cc b/src/um/QuotaNetwork.cc index 8d438740aa..e9267413c3 100644 --- a/src/um/QuotaNetwork.cc +++ b/src/um/QuotaNetwork.cc @@ -53,7 +53,10 @@ bool QuotaNetwork::check(Template * tmpl, string& error) if ( !net_id.empty() ) { - return check_quota(net_id, net_request, error); + if ( !check_quota(net_id, net_request, error) ) + { + return false; + } } }