Revision ebc810f4 src/zone/Zone.cc

View differences:

src/zone/Zone.cc
299 299

  
300 300
/* -------------------------------------------------------------------------- */
301 301
/* -------------------------------------------------------------------------- */
302

  
303
int Zone::add_servers(Template& tmpl, string& error)
304
{
305
    vector<VectorAttribute *> vs;
306
    vector<VectorAttribute *>::iterator it;
307

  
308
    VectorAttribute * server;
309

  
310
    tmpl.get(ZoneServers::SERVER_NAME, vs);
311

  
312
    for ( it = vs.begin() ; it != vs.end() ; ++it )
313
    {
314
        server = new VectorAttribute(*it);
315

  
316
        if ( servers->add_server(server, error) == -1 )
317
        {
318
            delete server;
319

  
320
            return -1;
321
        }
322

  
323
        servers_template.set(server);
324
    }
325

  
326
    return 0;
327
}
328

  

Also available in: Unified diff