Revision ef438293

View differences:

include/RequestManagerSystem.h
140 140

  
141 141
    virtual int set_default_quota(Template *tmpl, string& error) = 0;
142 142

  
143
    virtual string& get_default_quota(string& xml) = 0;
143
    virtual string get_default_quota() = 0;
144 144
};
145 145

  
146 146
/* ------------------------------------------------------------------------- */
......
158 158

  
159 159
    int set_default_quota(Template *tmpl, string& error);
160 160

  
161
    string& get_default_quota(string& xml);
161
    string get_default_quota();
162 162
};
163 163

  
164 164
/* ------------------------------------------------------------------------- */
......
176 176

  
177 177
    int set_default_quota(Template *tmpl, string& error);
178 178

  
179
    string& get_default_quota(string& xml);
179
    string get_default_quota();
180 180
};
181 181

  
182 182
/* -------------------------------------------------------------------------- */
src/rm/RequestManagerSystem.cc
61 61
                                 RequestAttributes& att)
62 62
{
63 63
    string xml;
64
    success_response(Nebula::instance().get_default_user_quota().to_xml(xml), att);
64

  
65
    ostringstream oss;
66

  
67
    oss << "<DEFAULT_USER_QUOTAS>"
68
        << Nebula::instance().get_default_user_quota().to_xml(xml)
69
        << "</DEFAULT_USER_QUOTAS>";
70

  
71
    success_response(oss.str(), att);
65 72

  
66 73
    return;
67 74
}
......
73 80
                                 RequestAttributes& att)
74 81
{
75 82
    string xml;
76
    success_response(Nebula::instance().get_default_group_quota().to_xml(xml), att);
83

  
84
    ostringstream oss;
85

  
86
    oss << "<DEFAULT_GROUP_QUOTAS>"
87
        << Nebula::instance().get_default_group_quota().to_xml(xml)
88
        << "</DEFAULT_GROUP_QUOTAS>";
89

  
90
    success_response(oss.str(), att);
77 91

  
78 92
    return;
79 93
}
......
87 101
    string   quota_str = xmlrpc_c::value_string(paramList.getString(1));
88 102
    string   error_str;
89 103
    Template quota_tmpl;
90
    string   xml;
91 104

  
92 105
    int     rc;
93 106

  
......
115 128
        return;
116 129
    }
117 130

  
118
    success_response(get_default_quota(xml), att);
131
    success_response(get_default_quota(), att);
119 132

  
120 133
    return;
121 134
}
......
131 144
/* ------------------------------------------------------------------------- */
132 145
/* ------------------------------------------------------------------------- */
133 146

  
134
string& UserQuotaUpdate::get_default_quota(string& xml)
147
string UserQuotaUpdate::get_default_quota()
135 148
{
136
    return Nebula::instance().get_default_user_quota().to_xml(xml);
149
    string xml;
150
    ostringstream oss;
151

  
152
    oss << "<DEFAULT_USER_QUOTAS>"
153
        << Nebula::instance().get_default_user_quota().to_xml(xml)
154
        << "</DEFAULT_USER_QUOTAS>";
155

  
156
    return oss.str();
137 157
}
138 158

  
139 159
/* ------------------------------------------------------------------------- */
......
147 167
/* ------------------------------------------------------------------------- */
148 168
/* ------------------------------------------------------------------------- */
149 169

  
150
string& GroupQuotaUpdate::get_default_quota(string& xml)
170
string GroupQuotaUpdate::get_default_quota()
151 171
{
152
    return Nebula::instance().get_default_group_quota().to_xml(xml);
172
    string xml;
173
    ostringstream oss;
174

  
175
    oss << "<DEFAULT_GROUP_QUOTAS>"
176
        << Nebula::instance().get_default_group_quota().to_xml(xml)
177
        << "</DEFAULT_GROUP_QUOTAS>";
178

  
179
    return oss.str();
153 180
}
154 181

  
155 182
/* ------------------------------------------------------------------------- */

Also available in: Unified diff