- fixed bug in MmsValue_encodeToBuffer function. Encoding to MMS_INTEGER/MMS_UNSIGNED was wrong.

This commit is contained in:
Michael Zillgith 2015-02-09 11:14:25 +01:00
parent 30a64e2914
commit e32a7a3c53
2 changed files with 4 additions and 4 deletions

View file

@ -984,6 +984,7 @@ MmsValue_cloneToBuffer(MmsValue* self, uint8_t* destinationAddress)
case MMS_INTEGER:
case MMS_UNSIGNED:
{
newValue->value.integer = (Asn1PrimitiveValue*) destinationAddress;
Asn1PrimitiveValue* newAsn1Value = (Asn1PrimitiveValue*) destinationAddress;
memcpy(destinationAddress, self->value.integer, sizeof(Asn1PrimitiveValue));
destinationAddress += sizeof(Asn1PrimitiveValue);

View file

@ -204,7 +204,6 @@ void /* send information report for a named variable list */
MmsServerConnection_sendInformationReportVMDSpecific(MmsServerConnection* self, char* itemId, LinkedList values,
bool handlerMode)
{
uint32_t variableAccessSpecSize = 0;
uint32_t objectNameSize = 0;
@ -226,11 +225,11 @@ MmsServerConnection_sendInformationReportVMDSpecific(MmsServerConnection* self,
for (i = 0; i < variableCount; i++) {
MmsValue* data = (MmsValue*) value->data;
MmsValue* data = (MmsValue*) value->data;
accessResultSize += mmsServer_encodeAccessResult(data, NULL, 0, false);
accessResultSize += mmsServer_encodeAccessResult(data, NULL, 0, false);
value = LinkedList_getNext(value);
value = LinkedList_getNext(value);
}
listOfAccessResultSize = accessResultSize +