- code formatting

pull/119/head
Michael Zillgith 7 years ago
parent 01933c415a
commit 4bd8b40b6c

@ -112,28 +112,28 @@ mmsClient_parseGetNameListResponse(LinkedList* nameList, ByteBuffer* message)
{ {
/* TODO only parse get name list specific part here */ /* TODO only parse get name list specific part here */
bool moreFollows = true; bool moreFollows = true;
uint8_t* buffer = message->buffer; uint8_t* buffer = message->buffer;
int maxBufPos = message->size; int maxBufPos = message->size;
int bufPos = 0; int bufPos = 0;
int length; int length;
uint8_t tag = buffer[bufPos++]; uint8_t tag = buffer[bufPos++];
if (tag == 0xa2) { if (tag == 0xa2) {
/* TODO parse confirmed error PDU */ /* TODO parse confirmed error PDU */
goto exit_error; goto exit_error;
} }
if (tag != 0xa1) goto exit_error; if (tag != 0xa1) goto exit_error;
bufPos = BerDecoder_decodeLength(buffer, &length, bufPos, maxBufPos); bufPos = BerDecoder_decodeLength(buffer, &length, bufPos, maxBufPos);
if (bufPos < 0) goto exit_error; if (bufPos < 0) goto exit_error;
/* get invokeId */ /* get invokeId */
tag = buffer[bufPos++]; tag = buffer[bufPos++];
if (tag != 0x02) goto exit_error; if (tag != 0x02) goto exit_error;
bufPos = BerDecoder_decodeLength(buffer, &length, bufPos, maxBufPos); bufPos = BerDecoder_decodeLength(buffer, &length, bufPos, maxBufPos);
if (bufPos < 0) goto exit_error; if (bufPos < 0) goto exit_error;
bufPos += length; bufPos += length;

@ -3,22 +3,22 @@
* *
* Copyright 2013-2018 Michael Zillgith * Copyright 2013-2018 Michael Zillgith
* *
* This file is part of libIEC61850. * This file is part of libIEC61850.
* *
* libIEC61850 is free software: you can redistribute it and/or modify * libIEC61850 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* libIEC61850 is distributed in the hope that it will be useful, * libIEC61850 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with libIEC61850. If not, see <http://www.gnu.org/licenses/>. * along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
* *
* See COPYING file for the complete license text. * See COPYING file for the complete license text.
*/ */
#include "libiec61850_platform_includes.h" #include "libiec61850_platform_includes.h"

Loading…
Cancel
Save