Revision cad2422f src/um/Quotas.cc

View differences:

src/um/Quotas.cc
19 19

  
20 20
#include "ObjectXML.h"
21 21

  
22

  
23
int Quotas::set(Template *tmpl, string& error)
22
int Quotas::set(Template *tmpl, bool default_allowed, string& error)
24 23
{
25 24
    vector<Attribute *> vquotas;
26 25

  
27 26
    if ( tmpl->get(datastore_quota.get_quota_name(), vquotas) > 0 )
28 27
    {
29
        if ( datastore_quota.set(&vquotas, error) != 0 )
28
        if ( datastore_quota.set(&vquotas, default_allowed, error) != 0 )
30 29
        {
31 30
            return -1;
32 31
        }
......
36 35

  
37 36
    if ( tmpl->get(network_quota.get_quota_name(), vquotas) > 0 )
38 37
    {
39
        if ( network_quota.set(&vquotas, error) != 0 )
38
        if ( network_quota.set(&vquotas, default_allowed, error) != 0 )
40 39
        {
41 40
            return -1;
42 41
        }
......
46 45

  
47 46
    if ( tmpl->get(image_quota.get_quota_name(), vquotas) > 0 )
48 47
    {
49
        if ( image_quota.set(&vquotas, error) != 0 )
48
        if ( image_quota.set(&vquotas, default_allowed, error) != 0 )
50 49
        {
51 50
            return -1;
52 51
        }
......
56 55

  
57 56
    if ( tmpl->get(vm_quota.get_quota_name(), vquotas) > 0 )
58 57
    {
59
        if ( vm_quota.set(&vquotas, error) != 0 )
58
        if ( vm_quota.set(&vquotas, default_allowed, error) != 0 )
60 59
        {
61 60
            return -1;
62 61
        }

Also available in: Unified diff