Revision b38874a0 src/zone/ZonePool.cc

View differences:

src/zone/ZonePool.cc
202 202
/* -------------------------------------------------------------------------- */
203 203
/* -------------------------------------------------------------------------- */
204 204

  
205
unsigned int ZonePool::get_zone_servers(int zone_id,
206
        std::map<unsigned int, std::string>& _serv)
207
{
208
    unsigned int  _num_servers;
209

  
210
    ZoneServers::zone_iterator zit;
211

  
212
    Zone * zone = get(zone_id, true);
213

  
214
    if ( zone == 0 )
215
    {
216
        _serv.clear();
217
        return 0;
218
    }
219

  
220
    ZoneServers * followers = zone->get_servers();
221

  
222
    for (zit = followers->begin(); zit != followers->end(); ++zit)
223
    {
224
        unsigned int id  = (*zit)->get_id();
225
        std::string  edp = (*zit)->vector_value("ENDPOINT");
226

  
227
        _serv.insert(make_pair(id, edp));
228
    }
229

  
230
    _num_servers = zone->servers_size();
231

  
232
    zone->unlock();
233

  
234
    return _num_servers;
235
}
236

  

Also available in: Unified diff