get it to build

This commit is contained in:
Douglas Clowes
2012-11-27 13:34:05 +11:00
parent ca11a3cfe4
commit 27e89241cf
11 changed files with 502 additions and 196 deletions

View File

@@ -168,7 +168,8 @@ int ModbusWriteStart(Ascon *a) {
if (debug_modbus > 0) {
dbgprintx("modbus-xo", (unsigned char*)temp, idx);
}
DynStringReplaceWithLen(a->wrBuffer, temp, 0, idx);
DynStringClear(a->wrBuffer);
DynStringConcatBytes(a->wrBuffer, temp, idx);
a->state = AsconWriting;
a->wrPos = 0;
return 1;
@@ -230,7 +231,8 @@ int ModbusReading(Ascon *a) {
dbgprintx("modbus-xi", cp, blen);
}
dbgprintf("modbus-rd:%s\n", temp);
DynStringReplaceWithLen(a->rdBuffer, temp, 0, rlen);
DynStringClear(a->rdBuffer);
DynStringConcatBytes(a->rdBuffer, temp, rlen);
a->state = AsconReadDone;
return 1;
}