Revision cd580714 src/zone/Zone.cc

View differences:

src/zone/Zone.cc
300 300
/* -------------------------------------------------------------------------- */
301 301
/* -------------------------------------------------------------------------- */
302 302

  
303
int Zone::add_servers(Template& tmpl, string& error)
303
int Zone::add_server(Template& tmpl, string& error)
304 304
{
305 305
    vector<VectorAttribute *> vs;
306 306
    vector<VectorAttribute *>::iterator it;
......
326 326
    return 0;
327 327
}
328 328

  
329
int Zone::delete_server(int id, string& error)
330
{
331
    ZoneServer * zs;
332

  
333
    zs = servers->delete_server(id);
334

  
335
    if ( zs == 0 )
336
    {
337
        error = "SERVER not found in zone";
338
        return -1;
339
    }
340

  
341
    delete servers_template.remove(zs->vector_attribute());
342

  
343
    delete zs;
344

  
345
    return 0;
346
}

Also available in: Unified diff