Skip to content

Commit

Permalink
提交FtpTest插件对mpc的支持。
Browse files Browse the repository at this point in the history
  • Loading branch information
freeeyes committed Apr 18, 2016
1 parent 7cfe989 commit 5bc6dba
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int CBaseCommand::DoMessage(IMessage* pMessage, bool& bDeleteFlag)

if(m_pServerObject == NULL)
{
OUR_DEBUG((LM_ERROR, "[CBaseCommand::DoMessage] m_pServerObject is NULL.\n"));
OUR_DEBUG((LM_ERROR, "[CBaseCommand::DoMessage] m_pServerObject is NULL(%d).\n", bDeleteFlag));
return -1;
}

Expand Down Expand Up @@ -74,8 +74,6 @@ int CBaseCommand::DoMessage(IMessage* pMessage, bool& bDeleteFlag)

void CBaseCommand::Do_Ftp_Login( IMessage* pMessage )
{
uint32 u4PacketLen = 0;
uint16 u2CommandID = 0;
VCHARS_STR strUserName;
VCHARS_STR strUserPass;

Expand Down Expand Up @@ -123,8 +121,6 @@ void CBaseCommand::Do_Ftp_Login( IMessage* pMessage )

void CBaseCommand::Do_Ftp_Logout( IMessage* pMessage )
{
uint32 u4PacketLen = 0;
uint16 u2CommandID = 0;
VCHARS_STR strUserName;

IBuffPacket* pBodyPacket = m_pServerObject->GetPacketManager()->Create();
Expand Down Expand Up @@ -168,8 +164,6 @@ void CBaseCommand::Do_Ftp_Logout( IMessage* pMessage )

void CBaseCommand::Do_Ftp_FileList( IMessage* pMessage )
{
uint32 u4PacketLen = 0;
uint16 u2CommandID = 0;
VCHARS_STR strUserName;
VCHARM_STR strFilePath;

Expand Down Expand Up @@ -238,8 +232,6 @@ void CBaseCommand::Do_Ftp_FileList( IMessage* pMessage )

void CBaseCommand::Do_Ftp_FileDownLoad( IMessage* pMessage )
{
uint32 u4PacketLen = 0;
uint16 u2CommandID = 0;
VCHARS_STR strUserName;
VCHARM_STR strFilePath;
uint32 u4BlockSize; //块大小
Expand Down Expand Up @@ -333,8 +325,6 @@ void CBaseCommand::Do_Ftp_FileDownLoad( IMessage* pMessage )

void CBaseCommand::Do_Ftp_FileUpLoad(IMessage* pMessage)
{
uint32 u4PacketLen = 0;
uint16 u2CommandID = 0;
VCHARS_STR strUserName;
VCHARM_STR strFilePath;
VCHARB_STR strFileBuffer(false, VCHARS_TYPE_BINARY); //文件块信息(二进制模式)
Expand Down Expand Up @@ -373,7 +363,6 @@ void CBaseCommand::Do_Ftp_FileUpLoad(IMessage* pMessage)
return;
}

uint32 u4FileBlockSize = 0;
char* pBuffer = new char[u4BlockSize];

//接收文件块信息
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "BaseCommand.h"
#include "IObject.h"

#include "ace/svc_export.h"

static const char *g_szDesc = "样例FTP模块"; //模块的描述文字
static const char *g_szName = "FTP测试"; //模块的名字
static const char *g_szModuleKey = "BaseFCP"; //模块的Key
Expand All @@ -18,7 +20,7 @@
#define DECLDIR __declspec(dllimport)
#endif
#else
#define DECLDIR
#define DECLDIR ACE_Svc_Export
#endif

extern "C"
Expand Down Expand Up @@ -112,7 +114,11 @@ const char* GetModuleKey()
//用于模块间的调用接口
int DoModuleMessage(uint16 u2CommandID, IBuffPacket* pBuffPacket, IBuffPacket* pReturnBuffPacket)
{
return 0;
OUR_DEBUG((LM_INFO, "[DoModuleMessage] u2CommandID=%d, size=%d, return=%d.\n",
u2CommandID,
pBuffPacket->GetPacketLen(),
pReturnBuffPacket->GetPacketLen()));
return 0;
}

//交给框架使用,用于框架定时巡检插件状态
Expand All @@ -121,6 +127,8 @@ int DoModuleMessage(uint16 u2CommandID, IBuffPacket* pBuffPacket, IBuffPacket* p
//框架会根据这个设置,发送邮件给指定的邮箱
bool GetModuleState(uint32& u4ErrorID)
{
OUR_DEBUG((LM_INFO, "[GetModuleState] u4ErrorID=%d, size=%d, return=%d.\n",
u4ErrorID));
return true;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
project(FtpTest):acelib{
sharedname=FtpTest
dynamicflags += TEST_TCP_BUILD_DLL

Source_Files{
./*.cpp
}
macros += __LINUX__

libout = ./
specific (prop:microsoft){
dllout = ../../PurenessScopeServer/Windows_Bin
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mwc.pl -type gnuace

0 comments on commit 5bc6dba

Please sign in to comment.