+#include "types.h"
#include "rsm_client.h"
-#include <vector>
#include <arpa/inet.h>
-#include <stdio.h>
#include <handle.h>
#include <unistd.h>
-#include "lang/verify.h"
-#include "lock.h"
-#include "threaded_log.h"
-rsm_client::rsm_client(std::string dst) : primary(dst) {
+rsm_client::rsm_client(string dst) : primary(dst) {
LOG("create rsm_client");
lock ml(rsm_client_mutex);
VERIFY (init_members(ml));
known_mems.pop_back();
}
-rsm_protocol::status rsm_client::invoke(unsigned int proc, std::string &rep, const std::string &req) {
+rsm_protocol::status rsm_client::invoke(unsigned int proc, string &rep, const string &req) {
lock ml(rsm_client_mutex);
while (1) {
- LOG("rsm_client::invoke proc " << std::hex << proc << " primary " << primary);
+ LOG("rsm_client::invoke proc " << hex << proc << " primary " << primary);
handle h(primary);
ml.unlock();
if (!cl)
goto prim_fail;
- LOG("rsm_client::invoke proc " << std::hex << proc << " primary " << primary << " ret " << std::dec << ret);
+ LOG("rsm_client::invoke proc " << hex << proc << " primary " << primary << " ret " << dec << ret);
if (ret == rsm_client_protocol::OK)
return rsm_protocol::OK;
if (ret == rsm_client_protocol::BUSY) {
continue;
}
prim_fail:
- LOG("primary " << primary << " failed ret " << std::dec << ret);
+ LOG("primary " << primary << " failed ret " << dec << ret);
primary_failure(ml);
LOG("rsm_client::invoke: retry new primary " << primary);
}