Revision 87b5e5cb src/rm/RequestManagerZone.cc

View differences:

src/rm/RequestManagerZone.cc
273 273
    unsigned int term       = xmlrpc_c::value_int(paramList.getInt(5));
274 274
    unsigned int prev_index = xmlrpc_c::value_int(paramList.getInt(6));
275 275
    unsigned int prev_term  = xmlrpc_c::value_int(paramList.getInt(7));
276
    unsigned int fed_index  = xmlrpc_c::value_int(paramList.getInt(8));
276 277

  
277
    string sql = xmlrpc_c::value_string(paramList.getString(8));
278
    string sql = xmlrpc_c::value_string(paramList.getString(9));
278 279

  
279 280
    unsigned int current_term = raftm->get_term();
280 281

  
......
392 393

  
393 394
    ostringstream sql_oss(sql);
394 395

  
395
    if ( logdb->insert_log_record(index, term, sql_oss, 0) != 0 )
396
    if ( logdb->insert_log_record(index, term, sql_oss, 0, fed_index) != 0 )
396 397
    {
397 398
        att.resp_msg = "Error writing log record";
398 399
        att.resp_id  = current_term;
......
518 519
    FedReplicaManager * frm = nd.get_frm();
519 520

  
520 521
    int index  = xmlrpc_c::value_int(paramList.getInt(1));
521
    string sql = xmlrpc_c::value_string(paramList.getString(2));
522
    int prev   = xmlrpc_c::value_int(paramList.getInt(2));
523
    string sql = xmlrpc_c::value_string(paramList.getString(3));
522 524

  
523 525
    if ( att.uid != 0 )
524 526
    {
......
554 556
        return;
555 557
    }
556 558

  
557
    int rc = frm->apply_log_record(index, sql);
559
    int rc = frm->apply_log_record(index, prev, sql);
558 560

  
559 561
    if ( rc == 0 )
560 562
    {

Also available in: Unified diff