Skip to content

Commit

Permalink
- MMS client: fixed bug in log entry parsing (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzillgith committed Apr 2, 2020
1 parent 95f751e commit 4871989
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions examples/server_example_logging/server_example_logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ sigint_handler(int signalId)
}

static ControlHandlerResult
controlHandlerForBinaryOutput(void* parameter, MmsValue* value, bool test)
controlHandlerForBinaryOutput(ControlAction action, void* parameter, MmsValue* value, bool test)
{
if (test)
if (test) {
printf("Received test command\n");
return CONTROL_RESULT_FAILED;
}

if (MmsValue_getType(value) == MMS_BOOLEAN) {
printf("received binary control command: ");
Expand Down Expand Up @@ -148,7 +150,7 @@ main(int argc, char** argv)

IedServer_setLogStorage(iedServer, "GenericIO/LLN0$EventLog", statusLog);

#if 0
#if 1
uint64_t entryID = LogStorage_addEntry(statusLog, Hal_getTimeInMs());

MmsValue* value = MmsValue_newIntegerFromInt32(123);
Expand Down
2 changes: 1 addition & 1 deletion src/mms/iso_mms/client/mms_client_journals.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ parseJournalVariable(uint8_t* buffer, int bufPos, int maxLength, MmsJournalVaria
case 0xa1: /* valueSpec */

if (journalVariable->value == NULL) {
journalVariable->value = MmsValue_decodeMmsData(buffer, bufPos, length, NULL);
journalVariable->value = MmsValue_decodeMmsData(buffer, bufPos, bufPos + length, NULL);
}

break;
Expand Down

0 comments on commit 4871989

Please sign in to comment.