Lines Matching defs:bytesRead

515 bool LMEConnection::_checkMinMsgSize(unsigned char *buf, unsigned int bytesRead)
519 if (bytesRead < sizeof(APF_DISCONNECT_MESSAGE)) {
524 if (bytesRead < sizeof(APF_SERVICE_REQUEST)) {
527 if (bytesRead < (sizeof(APF_SERVICE_REQUEST) +
533 if (bytesRead < (3 * sizeof(UINT32))) {
538 if (bytesRead < (sizeof(APF_GENERIC_HEADER) + sizeof(UINT8))) {
541 if (bytesRead < (sizeof(APF_GENERIC_HEADER) + sizeof(UINT8) +
547 if (bytesRead < sizeof(APF_GENERIC_HEADER)) {
550 if (bytesRead < (sizeof(APF_GENERIC_HEADER) +
556 if (bytesRead < sizeof(APF_CHANNEL_OPEN_CONFIRMATION_MESSAGE)) {
561 if (bytesRead < sizeof(APF_CHANNEL_OPEN_FAILURE_MESSAGE)) {
566 if (bytesRead < sizeof(APF_CHANNEL_CLOSE_MESSAGE)) {
571 if (bytesRead < sizeof(APF_CHANNEL_DATA_MESSAGE)) {
574 if (bytesRead < (sizeof(APF_CHANNEL_DATA_MESSAGE) +
580 if (bytesRead < sizeof(APF_WINDOW_ADJUST_MESSAGE)) {
585 if (bytesRead < sizeof(APF_PROTOCOL_VERSION_MESSAGE)) {
597 unsigned int bytesRead;
605 bytesRead = (unsigned int)_receiveMessage(rxBuffer, _heci.GetBufferSize());
607 if ((int)bytesRead < 0) {
613 if (bytesRead == 0) {
618 PRINT("Received from LME %d bytes (msg type %02d)\n", bytesRead, rxBuffer[0]);
620 if (!_checkMinMsgSize(rxBuffer, bytesRead)) {
626 if (plugin.preprocess(rxBuffer, bytesRead) == LMS_DROPPED) {
656 _apfUserAuthRequest(rxBuffer, bytesRead, &status);
660 _apfGlobalRequest(rxBuffer, bytesRead, &status);
664 _apfChannelOpen(rxBuffer, bytesRead, &status);
747 plugin.postprocess(rxBuffer, bytesRead, status);
756 void LMEConnection::_apfChannelOpen(unsigned char *rxBuffer, unsigned int bytesRead, int *status)
766 _apfChannelOpenDirect(rxBuffer, bytesRead, &senderChannel, status);
768 if (plugin.retry(rxBuffer, bytesRead) != LMS_DROPPED) {
769 _apfChannelOpenDirect(rxBuffer, bytesRead, NULL, status);
779 void LMEConnection::_apfChannelOpenDirect(unsigned char *rxBuffer, unsigned int bytesRead, UINT32 *senderChannel, int *status)
784 if (bytesRead < sizeof(APF_GENERIC_HEADER) +
816 void LMEConnection::_apfGlobalRequest(unsigned char *rxBuffer, unsigned int bytesRead, int *status)
829 bytesRead -= hsize;
831 if (bytesRead < sizeof(UINT32)) {
840 if (bytesRead < (sizeof(UINT32) + len + sizeof(UINT32))) {
860 bytesRead -= hsize;
862 if (bytesRead < sizeof(UINT32)) {
871 if (bytesRead < (sizeof(UINT32) + len + sizeof(UINT32))) {
890 bytesRead -= hsize;
892 if (bytesRead < sizeof(UINT32)) {
901 if (bytesRead < (sizeof(UINT32) + len + sizeof(UINT32))) {
906 bytesRead -= (sizeof(UINT32) + len + sizeof(UINT32));
914 if (bytesRead < sizeof(UINT32)) {
924 if (bytesRead < (sizeof(UINT32) + len + sizeof(UINT32))) {
929 bytesRead -= (sizeof(UINT32) + len + sizeof(UINT32));
934 if (bytesRead < sizeof(UINT32)) {
944 if (bytesRead < (sizeof(UINT32) + len)) {
956 void LMEConnection::_apfUserAuthRequest(unsigned char *rxBuffer, unsigned int bytesRead, int *status)
967 if ((bytesRead - (pCurrent - rxBuffer)) < len) {
976 if ((unsigned int)(bytesRead - (pCurrent - rxBuffer)) < sizeof(UINT32)) {
985 if ((bytesRead - (pCurrent - rxBuffer)) < len) {
994 if ((unsigned int)(bytesRead - (pCurrent - rxBuffer)) < sizeof(UINT32)) {
1003 if ((bytesRead - (pCurrent - rxBuffer)) < len) {
1015 if ((unsigned int)(bytesRead - (pCurrent - rxBuffer)) < sizeof(UINT32) + 1) {
1026 if ((bytesRead - (pCurrent - rxBuffer)) < len) {