Revision b768f896 src/raft/RaftManager.cc

View differences:

src/raft/RaftManager.cc
49 49
        const VectorAttribute * follower_hook_mad, time_t log_purge,
50 50
        long long bcast, long long elect, time_t xmlrpc,
51 51
        const string& remotes_location):server_id(id), term(0), num_servers(0),
52
        commit(0),leader_hook(0),follower_hook(0)
52
        commit(0), leader_hook(0), follower_hook(0)
53 53
{
54 54
    Nebula& nd    = Nebula::instance();
55 55
    LogDB * logdb = nd.get_logdb();
......
180 180
            follower_hook = new RaftFollowerHook(cmd, arg);
181 181
        }
182 182
    }
183

  
184
    if ( state == FOLLOWER && follower_hook != 0 )
185
    {
186
        follower_hook->do_hook(0);
187
    }
183 188
};
184 189

  
185 190
/* -------------------------------------------------------------------------- */
......
1092 1097
    // -------------------------------------------------------------------------
1093 1098
    // Do the XML-RPC call
1094 1099
    // -------------------------------------------------------------------------
1095
    xml_rc = Client::client()->call(follower_edp, replica_method, replica_params,
1100
    xml_rc = Client::call(follower_edp, replica_method, replica_params,
1096 1101
            xmlrpc_timeout_ms, &result, error);
1097 1102

  
1098 1103
    if ( xml_rc == 0 )
......
1184 1189
    // -------------------------------------------------------------------------
1185 1190
    // Do the XML-RPC call
1186 1191
    // -------------------------------------------------------------------------
1187
    xml_rc = Client::client()->call(follower_edp, replica_method, replica_params,
1192
    xml_rc = Client::call(follower_edp, replica_method, replica_params,
1188 1193
        xmlrpc_timeout_ms, &result, error);
1189 1194

  
1190 1195
    if ( xml_rc == 0 )

Also available in: Unified diff