Fixed GBT multiframe

This commit is contained in:
Gunnar Skjold
2022-05-13 09:16:40 +02:00
parent b2e144efcf
commit fab637cf60
3 changed files with 13 additions and 8 deletions

View File

@@ -858,8 +858,7 @@ bool readHanPort() {
if(ga == NULL) {
ga = new GBTAssembler();
}
ga->init((uint8_t *) hanBuffer, &context);
if(ga->append((uint8_t *) hanBuffer+context.apduStart, len, &Debug) < 0) {
if(ga->append(&context, (uint8_t *) hanBuffer, len, &Debug) < 0) {
debugE("GBT assembler failed");
len = 0;
return false;
@@ -876,7 +875,7 @@ bool readHanPort() {
debugD("Final block dump (%db):", len);
debugPrint(hanBuffer, 0, len);
}
if(ga->append((uint8_t *) hanBuffer+context.apduStart, len, &Debug) >= 0) {
if(ga->append(&context, (uint8_t *) hanBuffer, len, &Debug) >= 0) {
len = ga->write((uint8_t *) hanBuffer);
pos = HDLC_validate((uint8_t *) hanBuffer, len, hc, &timestamp, &context);
} else {