MCPcopy Create free account
hub / github.com/Tencent/phxpaxos / PackCheckpointMsg

Method PackCheckpointMsg

src/algorithm/base.cpp:82–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82int Base :: PackCheckpointMsg(const CheckpointMsg & oCheckpointMsg, std::string & sBuffer)
83{
84 std::string sBodyBuffer;
85 bool bSucc = oCheckpointMsg.SerializeToString(&sBodyBuffer);
86 if (!bSucc)
87 {
88 PLGErr("CheckpointMsg.SerializeToString fail, skip this msg");
89 return -1;
90 }
91
92 int iCmd = MsgCmd_CheckpointMsg;
93 PackBaseMsg(sBodyBuffer, iCmd, sBuffer);
94
95 return 0;
96}
97
98void Base :: PackBaseMsg(const std::string & sBodyBuffer, const int iCmd, std::string & sBuffer)
99{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected