Feature #1611: Instead of changing negative limits to 0, report the error

This commit is contained in:
Carlos Martín authored and Tino Vazquez committed 2012-12-21 11:13:59 +01:00
1 parent 66182bb23d
commit 5a987f258d
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -182,7 +182,7 @@ private:
* @param va limits for the new quota if 0 limits will be 0
* @param default_allowed whether or not the limit -1 is allowed
*
* @return a new attribute representing the quota
* @return a new attribute representing the quota, 0 on error
*/
VectorAttribute * new_quota(VectorAttribute* va, bool default_allowed);
+1 -1
View File
@@ -413,7 +413,7 @@ VectorAttribute * Quota::new_quota(VectorAttribute * va, bool default_allowed)
if ( (default_allowed && limit_i < -1) ||
(!default_allowed && limit_i < 0) )
{
limit = "0";
return 0;
}
limits.insert(make_pair(metrics[i], limit));