- aded missing header file
This commit is contained in:
parent
d0676ba305
commit
95bc26883e
4 changed files with 51 additions and 28 deletions
41
src/mms/inc_private/mms_indication.h
Normal file
41
src/mms/inc_private/mms_indication.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* mms_indication.h
|
||||
*
|
||||
* Copyright 2015 Michael Zillgith
|
||||
*
|
||||
* This file is part of libIEC61850.
|
||||
*
|
||||
* libIEC61850 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* libIEC61850 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with libIEC61850. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* See COPYING file for the complete license text.
|
||||
*
|
||||
*
|
||||
* MMS client connection handling code for libiec61850.
|
||||
*
|
||||
* Handles a MMS client connection.
|
||||
*/
|
||||
|
||||
#ifndef MMS_INDICATION_H_
|
||||
#define MMS_INDICATION_H_
|
||||
|
||||
#define DEFAULT_MAX_SERV_OUTSTANDING_CALLING 5
|
||||
#define DEFAULT_MAX_SERV_OUTSTANDING_CALLED 5
|
||||
#define DEFAULT_DATA_STRUCTURE_NESTING_LEVEL 10
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MMS_ERROR, MMS_INITIATE, MMS_CONFIRMED_REQUEST, MMS_OK, MMS_CONCLUDE
|
||||
} MmsIndication;
|
||||
|
||||
#endif /* MMS_INDICATION_H_ */
|
|
@ -20,6 +20,7 @@
|
|||
*
|
||||
* See COPYING file for the complete license text.
|
||||
*/
|
||||
|
||||
#include <MmsPdu.h>
|
||||
#include "mms_common.h"
|
||||
#include "mms_client_connection.h"
|
||||
|
|
|
@ -565,7 +565,7 @@ parseConfirmedErrorPDU(ByteBuffer* message, uint32_t* invokeId, MmsServiceError*
|
|||
|
||||
return bufPos;
|
||||
|
||||
exit_error:
|
||||
exit_error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -114,47 +114,28 @@ mmsClient_parseInitiateResponse(MmsConnection self)
|
|||
(void**) &mmsPdu, ByteBuffer_getBuffer(self->lastResponse),
|
||||
ByteBuffer_getSize(self->lastResponse));
|
||||
|
||||
if (rval.code != RC_OK) goto exit;
|
||||
if (rval.code != RC_OK) goto exit_function;
|
||||
|
||||
if (mmsPdu->present == MmsPdu_PR_initiateResponsePdu) {
|
||||
InitiateResponsePdu_t* initiateResponse = &(mmsPdu->choice.initiateResponsePdu);
|
||||
|
||||
if (initiateResponse->localDetailCalled != NULL) {
|
||||
long maxPduSize;
|
||||
if (initiateResponse->localDetailCalled != NULL)
|
||||
self->parameters.maxPduSize = *(initiateResponse->localDetailCalled);
|
||||
|
||||
maxPduSize = *(initiateResponse->localDetailCalled);
|
||||
if (initiateResponse->negotiatedDataStructureNestingLevel != NULL)
|
||||
self->parameters.dataStructureNestingLevel = *(initiateResponse->negotiatedDataStructureNestingLevel);;
|
||||
|
||||
self->parameters.maxPduSize = maxPduSize;
|
||||
}
|
||||
self->parameters.maxServOutstandingCalled = initiateResponse->negotiatedMaxServOutstandingCalled;
|
||||
|
||||
if (initiateResponse->negotiatedDataStructureNestingLevel != NULL) {
|
||||
long nestingLevel;
|
||||
|
||||
nestingLevel = *(initiateResponse->negotiatedDataStructureNestingLevel);
|
||||
|
||||
self->parameters.dataStructureNestingLevel = nestingLevel;
|
||||
}
|
||||
|
||||
long maxServerOutstandingCalled;
|
||||
|
||||
maxServerOutstandingCalled = initiateResponse->negotiatedMaxServOutstandingCalled;
|
||||
|
||||
self->parameters.maxServOutstandingCalled = maxServerOutstandingCalled;
|
||||
|
||||
long maxServerOutstandingCalling;
|
||||
|
||||
maxServerOutstandingCalling = initiateResponse->negotiatedMaxServOutstandingCalling;
|
||||
|
||||
self->parameters.maxServOutstandingCalling = maxServerOutstandingCalling;
|
||||
self->parameters.maxServOutstandingCalling = initiateResponse->negotiatedMaxServOutstandingCalling;
|
||||
|
||||
result = true;
|
||||
}
|
||||
else
|
||||
//TODO parse error message
|
||||
result = false;
|
||||
|
||||
exit:
|
||||
asn_DEF_MmsPdu.free_struct(&asn_DEF_MmsPdu, mmsPdu, 0);
|
||||
|
||||
exit_function:
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue