Lines Matching defs:bufPtr
788 int HdcSessionBase::SendByProtocol(HSession hSession, uint8_t *bufPtr, const int bufLen, bool echo)
792 delete[] bufPtr;
801 ret = pTCP->WriteUvTcpFd(&hSession->hChildWorkTCP, bufPtr, bufLen);
804 ret = pTCP->WriteUvTcpFd(&hSession->hWorkTCP, bufPtr, bufLen);
806 ret = pTCP->WriteUvTcpFd(&hSession->hChildWorkTCP, bufPtr, bufLen);
813 ret = pUSB->SendUSBBlock(hSession, bufPtr, bufLen);
814 delete[] bufPtr;
820 ret = pUART->SendUARTData(hSession, bufPtr, bufLen);
821 delete[] bufPtr;
915 int HdcSessionBase::OnRead(HSession hSession, uint8_t *bufPtr, const int bufLen)
919 if (memcmp(bufPtr, PACKET_FLAG.c_str(), PACKET_FLAG.size())) {
920 WRITE_LOG(LOG_FATAL, "PACKET_FLAG incorrect %x %x", bufPtr[0], bufPtr[1]);
923 struct PayloadHead *payloadHead = reinterpret_cast<struct PayloadHead *>(bufPtr);
938 if (DecryptPayload(hSession, payloadHead, bufPtr + packetHeadSize)) {