|
|
|
@ -96,6 +96,7 @@ handleUnconfirmedMmsPdu(MmsConnection self, ByteBuffer* message)
|
|
|
|
|
{
|
|
|
|
|
int nameSize =
|
|
|
|
|
report->variableAccessSpecification.choice.variableListName.choice.vmdspecific.size;
|
|
|
|
|
|
|
|
|
|
uint8_t* buffer =
|
|
|
|
|
report->variableAccessSpecification.choice.variableListName.choice.vmdspecific.buf;
|
|
|
|
|
|
|
|
|
@ -158,7 +159,7 @@ handleUnconfirmedMmsPdu(MmsConnection self, ByteBuffer* message)
|
|
|
|
|
self->reportHandler(self->reportHandlerParameter, domainId, variableListName,
|
|
|
|
|
value, false);
|
|
|
|
|
|
|
|
|
|
/* report handler should have deleted the MmsValue! */
|
|
|
|
|
/* report handler is responsible to delete the MmsValue object */
|
|
|
|
|
if (variableSpecSize != 1)
|
|
|
|
|
MmsValue_setElement(values, i, NULL);
|
|
|
|
|
else
|
|
|
|
@ -176,7 +177,7 @@ handleUnconfirmedMmsPdu(MmsConnection self, ByteBuffer* message)
|
|
|
|
|
report->variableAccessSpecification.choice.listOfVariable.list.array[i]
|
|
|
|
|
->variableSpecification.choice.name.choice.domainspecific.itemId.size;
|
|
|
|
|
|
|
|
|
|
if (domainNameSize < 65 && itemNameSize < 65) {
|
|
|
|
|
if ((domainNameSize < 65) && (itemNameSize < 65)) {
|
|
|
|
|
char domainNameStr[65];
|
|
|
|
|
char itemNameStr[65];
|
|
|
|
|
|
|
|
|
@ -201,7 +202,7 @@ handleUnconfirmedMmsPdu(MmsConnection self, ByteBuffer* message)
|
|
|
|
|
self->reportHandler(self->reportHandlerParameter, domainNameStr, itemNameStr,
|
|
|
|
|
value, false);
|
|
|
|
|
|
|
|
|
|
/* report handler should have deleted the MmsValue! */
|
|
|
|
|
/* report handler is responsible to delete the MmsValue object */
|
|
|
|
|
if (variableSpecSize != 1)
|
|
|
|
|
MmsValue_setElement(values, i, NULL);
|
|
|
|
|
else
|
|
|
|
@ -323,6 +324,10 @@ sendMessage(MmsConnection self, ByteBuffer* message)
|
|
|
|
|
}
|
|
|
|
|
#endif /* (CONFIG_MMS_RAW_MESSAGE_LOGGING == 1) */
|
|
|
|
|
|
|
|
|
|
#if (CONFIG_MMS_COLLECT_STATISTICS == 1)
|
|
|
|
|
self->statAplMessagesSent++;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
IsoClientConnection_sendMessage(self->isoClient, message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -549,6 +554,7 @@ mmsMsg_parseConfirmedErrorPDU(uint8_t* buffer, int bufPos, int maxBufPos, uint32
|
|
|
|
|
tag = buffer[bufPos++];
|
|
|
|
|
|
|
|
|
|
bufPos = BerDecoder_decodeLength(buffer, &length, bufPos, maxBufPos);
|
|
|
|
|
|
|
|
|
|
if (bufPos < 0)
|
|
|
|
|
goto exit_error;
|
|
|
|
|
|
|
|
|
@ -608,6 +614,7 @@ mmsMsg_parseRejectPDU(uint8_t* buffer, int bufPos, int maxBufPos, uint32_t* invo
|
|
|
|
|
tag = buffer[bufPos++];
|
|
|
|
|
|
|
|
|
|
bufPos = BerDecoder_decodeLength(buffer, &length, bufPos, maxBufPos);
|
|
|
|
|
|
|
|
|
|
if (bufPos < 0)
|
|
|
|
|
goto exit_error;
|
|
|
|
|
|
|
|
|
@ -717,7 +724,7 @@ handleAsyncResponse(MmsConnection self, ByteBuffer* response, uint32_t bufPos, M
|
|
|
|
|
if (response) {
|
|
|
|
|
bool deletable = false;
|
|
|
|
|
|
|
|
|
|
LinkedList accessSpec = mmsClient_parseGetNamedVariableListAttributesResponse(response, NULL, &deletable);
|
|
|
|
|
LinkedList accessSpec = mmsClient_parseGetNamedVariableListAttributesResponse(response, &deletable);
|
|
|
|
|
|
|
|
|
|
if (accessSpec == false)
|
|
|
|
|
err = MMS_ERROR_PARSING_RESPONSE;
|
|
|
|
@ -1061,6 +1068,7 @@ mmsIsoCallback(IsoIndication indication, void* parameter, ByteBuffer* payload)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (tag == 0xa2) { /* confirmed error PDU */
|
|
|
|
|
|
|
|
|
|
if (DEBUG_MMS_CLIENT)
|
|
|
|
|
printf("MMS_CLIENT: Confirmed error PDU!\n");
|
|
|
|
|
|
|
|
|
@ -1098,6 +1106,7 @@ mmsIsoCallback(IsoIndication indication, void* parameter, ByteBuffer* payload)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (tag == 0xa4) { /* reject PDU */
|
|
|
|
|
|
|
|
|
|
if (DEBUG_MMS_CLIENT)
|
|
|
|
|
printf("MMS_CLIENT: reject PDU!\n");
|
|
|
|
|
|
|
|
|
@ -1714,11 +1723,15 @@ MmsConnection_abort(MmsConnection self, MmsError* mmsError)
|
|
|
|
|
success = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
Thread_sleep(10);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (success == false) {
|
|
|
|
|
IsoClientConnection_close(self->isoClient);
|
|
|
|
|
*mmsError = MMS_ERROR_SERVICE_TIMEOUT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1744,7 +1757,6 @@ concludeHandler(void* parameter, MmsError mmsError, bool success)
|
|
|
|
|
Semaphore_post(parameters->sem);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
MmsConnection_conclude(MmsConnection self, MmsError* mmsError)
|
|
|
|
|
{
|
|
|
|
@ -2282,7 +2294,6 @@ exit_function:
|
|
|
|
|
return invokeId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MmsValue*
|
|
|
|
|
MmsConnection_readNamedVariableListValues(MmsConnection self, MmsError* mmsError,
|
|
|
|
|
const char* domainId, const char* listName,
|
|
|
|
@ -2346,14 +2357,12 @@ exit_function:
|
|
|
|
|
return invokeId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MmsValue*
|
|
|
|
|
MmsConnection_readNamedVariableListValuesAssociationSpecific(
|
|
|
|
|
MmsConnection self, MmsError* mmsError,
|
|
|
|
|
const char* listName,
|
|
|
|
|
bool specWithResult)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
MmsValue* value = NULL;
|
|
|
|
|
MmsError err = MMS_ERROR_NONE;
|
|
|
|
|
|
|
|
|
@ -2638,7 +2647,6 @@ exit_function:
|
|
|
|
|
return invokeId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
|
MmsConnection_defineNamedVariableListAssociationSpecific(MmsConnection self,
|
|
|
|
|
MmsError* mmsError, const char* listName, LinkedList variableSpecs)
|
|
|
|
@ -2694,7 +2702,6 @@ exit_function:
|
|
|
|
|
return invokeId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool
|
|
|
|
|
MmsConnection_deleteNamedVariableList(MmsConnection self, MmsError* mmsError,
|
|
|
|
|
const char* domainId, const char* listName)
|
|
|
|
@ -4289,4 +4296,3 @@ MmsVariableAccessSpecification_destroy(MmsVariableAccessSpecification* self)
|
|
|
|
|
|
|
|
|
|
GLOBAL_FREEMEM(self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|