Revision fa9e5d94 src/raft/FedReplicaManager.cc

View differences:

src/raft/FedReplicaManager.cc
274 274
/* -------------------------------------------------------------------------- */
275 275

  
276 276
int FedReplicaManager::get_next_record(int zone_id, std::string& zedp, 
277
        LogDBRecord& lr)
277
        LogDBRecord& lr, std::string& error)
278 278
{
279 279
    pthread_mutex_lock(&mutex);
280 280

  
......
303 303

  
304 304
    int rc = logdb->get_log_record(zs->next, lr);
305 305

  
306
    if ( rc == -1 )
307
    {
308
        std::ostringstream oss;
309

  
310
        oss << "Failed to load federation log record " << zs->next
311
            << " for zone " << zs->zone_id;
312

  
313
        error = oss.str();
314
    }
315

  
306 316
    pthread_mutex_unlock(&mutex);
307 317

  
308 318
    return rc;
......
380 390

  
381 391
    LogDBRecord lr;
382 392

  
383
    if ( get_next_record(zone_id, zedp, lr) != 0 )
393
    if ( get_next_record(zone_id, zedp, lr, error) != 0 )
384 394
    {
385
        error = "Failed to load federation log record";
386 395
        return -1;
387 396
    }
388 397

  

Also available in: Unified diff