Esempio n. 1
0
BOOL LogMng::WriteRecvMsg(MsgBuf *msg, int opt, THosts *hosts, ShareInfo *shareInfo,
	const std::vector<HostSub> *recvList, int64 *msg_id)
{
	if (msg->command & IPMSG_NOLOGOPT)
		return	FALSE;

	WriteStart();
	logMsg->flags |= DB_FLAG_FROM;
	SetLogMsgUser(cfg, &msg->hostSub, hosts, logMsg);

	char	buf[MAX_PATH_U8];
	char	*p = buf;

	p += strcpyz(p, LOGMSG_FROM);
	p += MakeListString(cfg, &msg->hostSub, hosts, p, TRUE);
	p += strcpyz(p, "\r\n");
	Write(buf);

	if (recvList && recvList->size() >= 1) {
		for (auto &h: *recvList) {
			p = buf;
			p += strcpyz(p, LOGMSG_CC);
			p += MakeListString(cfg, (HostSub *)&h, hosts, p, TRUE);
			p += strcpyz(p, "\r\n");
			Write(buf);

			SetLogMsgUser(cfg, (HostSub *)&h, hosts, logMsg);
		}
	}

	return	WriteMsg(msg->packetNo, msg->msgBuf.s(), msg->command, opt, msg->timestamp,
		shareInfo, msg_id);
}
Esempio n. 2
0
BOOL LogMng::WriteRecvMsg(MsgBuf *msg, THosts *hosts, ShareInfo *shareInfo)
{
	if (msg->command & IPMSG_NOLOGOPT)
		return	FALSE;

	WriteStart();
	char	buf[MAX_PATH] = " From: ";

	MakeListString(cfg, &msg->hostSub, hosts, buf + strlen(buf));
	strcat(buf, "\r\n");
	Write(buf);

	return	WriteMsg(msg->msgBuf, msg->command, shareInfo);
}
Esempio n. 3
0
BOOL LogMng::WriteSendStart()
{
	return	WriteStart();
}