aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol.cpp')
-rw-r--r--src/protocol.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 1e22467a33..745b4338e4 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -21,7 +21,7 @@ static const char* ppszTypeName[] =
CMessageHeader::CMessageHeader()
{
- memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart));
+ memcpy(pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE);
memset(pchCommand, 0, sizeof(pchCommand));
pchCommand[1] = 1;
nMessageSize = -1;
@@ -30,7 +30,7 @@ CMessageHeader::CMessageHeader()
CMessageHeader::CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn)
{
- memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart));
+ memcpy(pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE);
strncpy(pchCommand, pszCommand, COMMAND_SIZE);
nMessageSize = nMessageSizeIn;
nChecksum = 0;
@@ -47,7 +47,7 @@ std::string CMessageHeader::GetCommand() const
bool CMessageHeader::IsValid() const
{
// Check start string
- if (memcmp(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart)) != 0)
+ if (memcmp(pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE) != 0)
return false;
// Check the command string for errors