New upstream version 8.1.0
This commit is contained in:
22
storage/source/net/message/control/AckMsgEx.cpp
Normal file
22
storage/source/net/message/control/AckMsgEx.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <program/Program.h>
|
||||
#include "AckMsgEx.h"
|
||||
|
||||
bool AckMsgEx::processIncoming(ResponseContext& ctx)
|
||||
{
|
||||
LogContext log("Ack incoming");
|
||||
|
||||
LOG_DEBUG_CONTEXT(log, 5, std::string("Value: ") + getValue() );
|
||||
|
||||
AcknowledgmentStore* ackStore = Program::getApp()->getAckStore();
|
||||
ackStore->receivedAck(getValue() );
|
||||
|
||||
// note: this message does not require a response
|
||||
|
||||
App* app = Program::getApp();
|
||||
app->getNodeOpStats()->updateNodeOp(ctx.getSocket()->getPeerIP(), StorageOpCounter_ACK,
|
||||
getMsgHeaderUserID() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
13
storage/source/net/message/control/AckMsgEx.h
Normal file
13
storage/source/net/message/control/AckMsgEx.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <common/net/message/control/AckMsg.h>
|
||||
|
||||
// see class AcknowledgeableMsg (fhgfs_common) for a short description
|
||||
|
||||
class AckMsgEx : public AckMsg
|
||||
{
|
||||
public:
|
||||
virtual bool processIncoming(ResponseContext& ctx);
|
||||
};
|
||||
|
||||
|
||||
19
storage/source/net/message/control/SetChannelDirectMsgEx.cpp
Normal file
19
storage/source/net/message/control/SetChannelDirectMsgEx.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <program/Program.h>
|
||||
#include "SetChannelDirectMsgEx.h"
|
||||
|
||||
bool SetChannelDirectMsgEx::processIncoming(ResponseContext& ctx)
|
||||
{
|
||||
LogContext log("SetChannelDirect incoming");
|
||||
|
||||
LOG_DEBUG_CONTEXT(log, 5, std::string("Value: ") + StringTk::intToStr(getValue() ) );
|
||||
|
||||
ctx.getSocket()->setIsDirect(getValue() );
|
||||
|
||||
App* app = Program::getApp();
|
||||
app->getNodeOpStats()->updateNodeOp(ctx.getSocket()->getPeerIP(),
|
||||
StorageOpCounter_SETCHANNELDIRECT, getMsgHeaderUserID() );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
13
storage/source/net/message/control/SetChannelDirectMsgEx.h
Normal file
13
storage/source/net/message/control/SetChannelDirectMsgEx.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <common/net/message/control/SetChannelDirectMsg.h>
|
||||
|
||||
// direct means the message is definitely processed on this server and not forwarded to another
|
||||
|
||||
class SetChannelDirectMsgEx : public SetChannelDirectMsg
|
||||
{
|
||||
public:
|
||||
virtual bool processIncoming(ResponseContext& ctx);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user